X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fgpio%2Fgpiolib.h;h=82be586c1f90edd8946cf5d9a23e208bc6dbbccc;hb=03d11a0e458d7008192585124e4c3313c2829046;hp=2ed23ab8298c88bbc0cc8efd5b98f0ed22369ed2;hpb=664e3e5ac64c8a1999e2d94bc307e5bcd17d3646;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h index 2ed23ab8298c..82be586c1f90 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -12,12 +12,35 @@ #ifndef GPIOLIB_H #define GPIOLIB_H +#include +#include + +/** + * struct acpi_gpio_info - ACPI GPIO specific information + * @gpioint: if %true this GPIO is of type GpioInt otherwise type is GpioIo + * @active_low: in case of @gpioint, the pin is active low + */ +struct acpi_gpio_info { + bool gpioint; + bool active_low; +}; + #ifdef CONFIG_ACPI void acpi_gpiochip_add(struct gpio_chip *chip); void acpi_gpiochip_remove(struct gpio_chip *chip); + +struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index, + struct acpi_gpio_info *info); #else static inline void acpi_gpiochip_add(struct gpio_chip *chip) { } static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { } + +static inline struct gpio_desc * +acpi_get_gpiod_by_index(struct device *dev, int index, + struct acpi_gpio_info *info) +{ + return ERR_PTR(-ENOSYS); +} #endif #endif /* GPIOLIB_H */