blob: 213135f443332d006f2cdd7ef4e6b3a088bf61f1 [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);
Rafael J. Wysocki7fc7acb2013-04-09 15:57:25 +020011void acpi_gpiochip_free_interrupts(struct gpio_chip *chip);
Mathias Nymane29482e2012-11-30 12:37:36 +010012
13#else /* CONFIG_GPIO_ACPI */
14
15static inline int acpi_get_gpio(char *path, int pin)
16{
17 return -ENODEV;
18}
19
Mathias Nyman0d1c28a2013-01-28 16:23:10 +020020static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }
Rafael J. Wysocki7fc7acb2013-04-09 15:57:25 +020021static inline void acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { }
Mathias Nyman0d1c28a2013-01-28 16:23:10 +020022
Mathias Nymane29482e2012-11-30 12:37:36 +010023#endif /* CONFIG_GPIO_ACPI */
24
25#endif /* _LINUX_ACPI_GPIO_H_ */