summaryrefslogtreecommitdiff
path: root/include/linux/acpi_gpio.h
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2013-01-28 16:23:10 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-01-29 11:47:06 +0100
commit0d1c28a449c6c23a126e3a08ee30914609aac227 (patch)
tree30995ef0e73b540d0eeb3fb0321e7baa8bcb01cf /include/linux/acpi_gpio.h
parentb42748c970d1865685749960cb23f08e259a9f86 (diff)
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 <rui.zhang@intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/acpi_gpio.h')
-rw-r--r--include/linux/acpi_gpio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/acpi_gpio.h b/include/linux/acpi_gpio.h
index 91615a389b65..b76ebd08ff8e 100644
--- a/include/linux/acpi_gpio.h
+++ b/include/linux/acpi_gpio.h
@@ -2,10 +2,12 @@
#define _LINUX_ACPI_GPIO_H_
#include <linux/errno.h>
+#include <linux/gpio.h>
#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_ */