From 0d1c28a449c6c23a126e3a08ee30914609aac227 Mon Sep 17 00:00:00 2001 From: Mathias Nyman Date: Mon, 28 Jan 2013 16:23:10 +0200 Subject: gpiolib-acpi: Add ACPI5 event model support to gpio. Add ability to handle ACPI events signalled by GPIO interrupts. ACPI5 platforms can use GPIO signaled ACPI events. These GPIO interrupts are handled by ACPI event methods which need to be called from the GPIO controller's interrupt handler. acpi_gpio_request_interrupt() finds out which gpio pins have acpi event methods and assigns interrupt handlers that calls the acpi event methods for those pins. Partially based on work by Rui Zhang Signed-off-by: Mathias Nyman Signed-off-by: Linus Walleij --- include/linux/acpi_gpio.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/linux/acpi_gpio.h') diff --git a/include/linux/acpi_gpio.h b/include/linux/acpi_gpio.h index 91615a389b6..b76ebd08ff8 100644 --- a/include/linux/acpi_gpio.h +++ b/include/linux/acpi_gpio.h @@ -2,10 +2,12 @@ #define _LINUX_ACPI_GPIO_H_ #include +#include #ifdef CONFIG_GPIO_ACPI int acpi_get_gpio(char *path, int pin); +void acpi_gpiochip_request_interrupts(struct gpio_chip *chip); #else /* CONFIG_GPIO_ACPI */ @@ -14,6 +16,8 @@ static inline int acpi_get_gpio(char *path, int pin) return -ENODEV; } +static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { } + #endif /* CONFIG_GPIO_ACPI */ #endif /* _LINUX_ACPI_GPIO_H_ */ -- cgit v1.2.3-70-g09d2