diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2014-01-08 11:40:56 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-01-08 15:07:28 +0100 |
commit | 5ccff85276addfdaad0046390bc5624f7e44e614 (patch) | |
tree | 4e1c1cdbdc77dcc647f926330c691066ad14b65d /drivers/gpio/gpiolib.h | |
parent | gpio / ACPI: register to ACPI events automatically (diff) | |
download | linux-5ccff85276addfdaad0046390bc5624f7e44e614.tar.xz linux-5ccff85276addfdaad0046390bc5624f7e44e614.zip |
gpio / ACPI: get rid of acpi_gpio.h
Now that all users of acpi_gpio.h have been moved to use either the GPIO
descriptor interface or to the internal gpiolib.h we can get rid of
acpi_gpio.h entirely.
Once this is done the only interface to get GPIOs to drivers enumerated
from ACPI namespace is the descriptor based interface.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.h')
-rw-r--r-- | drivers/gpio/gpiolib.h | 23 |
1 files changed, 23 insertions, 0 deletions
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 <linux/err.h> +#include <linux/device.h> + +/** + * 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 */ |