gpio / ACPI: Handle ACPI events in accordance with the spec
[firefly-linux-kernel-4.4.55.git] / include / linux / acpi_gpio.h
1 #ifndef _LINUX_ACPI_GPIO_H_
2 #define _LINUX_ACPI_GPIO_H_
3
4 #include <linux/errno.h>
5 #include <linux/gpio.h>
6
7 #ifdef CONFIG_GPIO_ACPI
8
9 int acpi_get_gpio(char *path, int pin);
10 void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
11 void acpi_gpiochip_free_interrupts(struct gpio_chip *chip);
12
13 #else /* CONFIG_GPIO_ACPI */
14
15 static inline int acpi_get_gpio(char *path, int pin)
16 {
17         return -ENODEV;
18 }
19
20 static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }
21 static inline void acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { }
22
23 #endif /* CONFIG_GPIO_ACPI */
24
25 #endif /* _LINUX_ACPI_GPIO_H_ */