blob: b76ebd08ff8e5a7f75d03b133c2e2cd2574b5373 [file] [log] [blame]
Mathias Nymane29482e2012-11-30 12:37:36 +01001#ifndef _LINUX_ACPI_GPIO_H_
2#define _LINUX_ACPI_GPIO_H_
3
4#include <linux/errno.h>
Mathias Nyman0d1c28a2013-01-28 16:23:10 +02005#include <linux/gpio.h>
Mathias Nymane29482e2012-11-30 12:37:36 +01006
7#ifdef CONFIG_GPIO_ACPI
8
9int acpi_get_gpio(char *path, int pin);
Mathias Nyman0d1c28a2013-01-28 16:23:10 +020010void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
Mathias Nymane29482e2012-11-30 12:37:36 +010011
12#else /* CONFIG_GPIO_ACPI */
13
14static inline int acpi_get_gpio(char *path, int pin)
15{
16 return -ENODEV;
17}
18
Mathias Nyman0d1c28a2013-01-28 16:23:10 +020019static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }
20
Mathias Nymane29482e2012-11-30 12:37:36 +010021#endif /* CONFIG_GPIO_ACPI */
22
23#endif /* _LINUX_ACPI_GPIO_H_ */