cs5535: add some additional cs5535-specific GPIO functionality
PATCH 1/1 cs5535: add some additional cs5535-specific GPIO functionality
From: Andres Salomon <[email protected]>
This adds (well, re-adds actually) handling for events/IRQs through cs5535 GPIOs. In the wild and wooly world of CS5535, setup_event() is for assigning an IRQ to a GPIO filter/event pair, and set_irq() sets up the pair to trigger IRQs.
These should really only be used in highly platform-specific drivers (such as OLPC's DCON driver). Sadly, because set_irq() uses MSRs, this causes the driver to become X86-specific.
Signed-off-by Andres Salomon <[email protected]>
Signed-off-by Daniel Drake <[email protected]>
--- drivers/gpio/Kconfig | 2 +- drivers/gpio/cs5535-gpio.c | 52 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/cs5535.h | 2 + 3 files changed, 55 insertions(+), 1 deletions(-)
GPIO seems to be without maintainer..?
Needed for further development of the OLPC DCON driver, currently in staging
drivers/gpio/Kconfig +1 -1
@@ -295,7 +295,7 @@ comment "PCI GPIO expanders:" config GPIO_CS5535 tristate "AMD CS5535/CS5536 GPIO support" - depends on PCI && !CS5535_GPIO + depends on PCI && X86 && !CS5535_GPIO help The AMD CS5535 and CS5536 southbridges support 28 GPIO pins that can be used for quite a number of things. The CS5535/6 is found on
drivers/gpio/cs5535-gpio.c +52 -0
64 lines not on this page · raw message
include/linux/cs5535.h +2 -0
@@ -111,6 +111,8 @@ static inline int cs5535_has_vsa2(void)void cs5535_gpio_set (unsigned offset,unsigned int reg);void cs5535_gpio_clear (unsigned offset,unsigned int reg);int cs5535_gpio_isset (unsigned offset,unsigned int reg); +int cs5535_gpio_set_irq (unsigned group,unsigned irq); +void cs5535_gpio_setup_event (unsigned offset,int pair,int pme);/* MFGPTs */
Signature · 1 line
1.7.3.2