Mathias Nyman | e29482e | 2012-11-30 12:37:36 +0100 | [diff] [blame] | 1 | #ifndef _LINUX_ACPI_GPIO_H_ |
| 2 | #define _LINUX_ACPI_GPIO_H_ |
| 3 | |
| 4 | #include <linux/errno.h> |
Mathias Nyman | 0d1c28a | 2013-01-28 16:23:10 +0200 | [diff] [blame] | 5 | #include <linux/gpio.h> |
Mathias Nyman | e29482e | 2012-11-30 12:37:36 +0100 | [diff] [blame] | 6 | |
| 7 | #ifdef CONFIG_GPIO_ACPI |
| 8 | |
| 9 | int acpi_get_gpio(char *path, int pin); |
Mathias Nyman | 0d1c28a | 2013-01-28 16:23:10 +0200 | [diff] [blame] | 10 | void acpi_gpiochip_request_interrupts(struct gpio_chip *chip); |
Mathias Nyman | e29482e | 2012-11-30 12:37:36 +0100 | [diff] [blame] | 11 | |
| 12 | #else /* CONFIG_GPIO_ACPI */ |
| 13 | |
| 14 | static inline int acpi_get_gpio(char *path, int pin) |
| 15 | { |
| 16 | return -ENODEV; |
| 17 | } |
| 18 | |
Mathias Nyman | 0d1c28a | 2013-01-28 16:23:10 +0200 | [diff] [blame] | 19 | static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { } |
| 20 | |
Mathias Nyman | e29482e | 2012-11-30 12:37:36 +0100 | [diff] [blame] | 21 | #endif /* CONFIG_GPIO_ACPI */ |
| 22 | |
| 23 | #endif /* _LINUX_ACPI_GPIO_H_ */ |