acpi_gpio.h 623 B

12345678910111213141516171819202122232425
  1. #ifndef _LINUX_ACPI_GPIO_H_
  2. #define _LINUX_ACPI_GPIO_H_
  3. #include <linux/errno.h>
  4. #include <linux/gpio.h>
  5. #ifdef CONFIG_GPIO_ACPI
  6. int acpi_get_gpio(char *path, int pin);
  7. void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
  8. void acpi_gpiochip_free_interrupts(struct gpio_chip *chip);
  9. #else /* CONFIG_GPIO_ACPI */
  10. static inline int acpi_get_gpio(char *path, int pin)
  11. {
  12. return -ENODEV;
  13. }
  14. static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }
  15. static inline void acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { }
  16. #endif /* CONFIG_GPIO_ACPI */
  17. #endif /* _LINUX_ACPI_GPIO_H_ */