aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.h
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2014-07-25 02:54:48 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-07-28 06:23:57 -0400
commitafa82fab5e136fc64eaf26db9b00c661286e1762 (patch)
tree551a6268bc2fc528e2420dfd41db45e1f83d92f0 /drivers/gpio/gpiolib.h
parent7f87210eff7a26a0215b493e9dd7322b16d8dc72 (diff)
gpio / ACPI: Move event handling registration to gpiolib irqchip helpers
Since now we have irqchip helpers that the GPIO chip drivers are supposed to use if possible, we can move the registration of ACPI events to happen in these helpers. This seems to be more natural place and might encourage GPIO chip driver writers to take advantage of the irqchip helpers. We make the functions available to GPIO chip drivers via private gpiolib.h, just in case generic irqchip helpers are not suitable. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.h')
-rw-r--r--drivers/gpio/gpiolib.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 7fcb645ded4c..9db2b6a71c5d 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -31,12 +31,21 @@ struct acpi_gpio_info {
31void acpi_gpiochip_add(struct gpio_chip *chip); 31void acpi_gpiochip_add(struct gpio_chip *chip);
32void acpi_gpiochip_remove(struct gpio_chip *chip); 32void acpi_gpiochip_remove(struct gpio_chip *chip);
33 33
34void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
35void acpi_gpiochip_free_interrupts(struct gpio_chip *chip);
36
34struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index, 37struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index,
35 struct acpi_gpio_info *info); 38 struct acpi_gpio_info *info);
36#else 39#else
37static inline void acpi_gpiochip_add(struct gpio_chip *chip) { } 40static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
38static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { } 41static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
39 42
43static inline void
44acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }
45
46static inline void
47acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { }
48
40static inline struct gpio_desc * 49static inline struct gpio_desc *
41acpi_get_gpiod_by_index(struct device *dev, int index, 50acpi_get_gpiod_by_index(struct device *dev, int index,
42 struct acpi_gpio_info *info) 51 struct acpi_gpio_info *info)