e29482e848
Add support for translating ACPI GPIO pin numbers to Linux GPIO API pins. Needs a gpio controller driver with the acpi handler hook set. Drivers can use acpi_get_gpio() to translate ACPI5 GpioIO and GpioInt resources to Linux GPIO's. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
20 lines
318 B
C
20 lines
318 B
C
#ifndef _LINUX_ACPI_GPIO_H_
|
|
#define _LINUX_ACPI_GPIO_H_
|
|
|
|
#include <linux/errno.h>
|
|
|
|
#ifdef CONFIG_GPIO_ACPI
|
|
|
|
int acpi_get_gpio(char *path, int pin);
|
|
|
|
#else /* CONFIG_GPIO_ACPI */
|
|
|
|
static inline int acpi_get_gpio(char *path, int pin)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
|
|
#endif /* CONFIG_GPIO_ACPI */
|
|
|
|
#endif /* _LINUX_ACPI_GPIO_H_ */
|