aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.h
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2014-01-08 05:40:56 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-01-08 09:07:28 -0500
commit5ccff85276addfdaad0046390bc5624f7e44e614 (patch)
tree4e1c1cdbdc77dcc647f926330c691066ad14b65d /drivers/gpio/gpiolib.h
parent664e3e5ac64c8a1999e2d94bc307e5bcd17d3646 (diff)
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.h23
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 @@
12#ifndef GPIOLIB_H 12#ifndef GPIOLIB_H
13#define GPIOLIB_H 13#define GPIOLIB_H
14 14
15#include <linux/err.h>
16#include <linux/device.h>
17
18/**
19 * struct acpi_gpio_info - ACPI GPIO specific information
20 * @gpioint: if %true this GPIO is of type GpioInt otherwise type is GpioIo
21 * @active_low: in case of @gpioint, the pin is active low
22 */
23struct acpi_gpio_info {
24 bool gpioint;
25 bool active_low;
26};
27
15#ifdef CONFIG_ACPI 28#ifdef CONFIG_ACPI
16void acpi_gpiochip_add(struct gpio_chip *chip); 29void acpi_gpiochip_add(struct gpio_chip *chip);
17void acpi_gpiochip_remove(struct gpio_chip *chip); 30void acpi_gpiochip_remove(struct gpio_chip *chip);
31
32struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index,
33 struct acpi_gpio_info *info);
18#else 34#else
19static inline void acpi_gpiochip_add(struct gpio_chip *chip) { } 35static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
20static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { } 36static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
37
38static inline struct gpio_desc *
39acpi_get_gpiod_by_index(struct device *dev, int index,
40 struct acpi_gpio_info *info)
41{
42 return ERR_PTR(-ENOSYS);
43}
21#endif 44#endif
22 45
23#endif /* GPIOLIB_H */ 46#endif /* GPIOLIB_H */