diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2014-07-25 02:54:48 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-07-28 06:23:57 -0400 |
commit | afa82fab5e136fc64eaf26db9b00c661286e1762 (patch) | |
tree | 551a6268bc2fc528e2420dfd41db45e1f83d92f0 /drivers/gpio/gpiolib.h | |
parent | 7f87210eff7a26a0215b493e9dd7322b16d8dc72 (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.h | 9 |
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 { | |||
31 | void acpi_gpiochip_add(struct gpio_chip *chip); | 31 | void acpi_gpiochip_add(struct gpio_chip *chip); |
32 | void acpi_gpiochip_remove(struct gpio_chip *chip); | 32 | void acpi_gpiochip_remove(struct gpio_chip *chip); |
33 | 33 | ||
34 | void acpi_gpiochip_request_interrupts(struct gpio_chip *chip); | ||
35 | void acpi_gpiochip_free_interrupts(struct gpio_chip *chip); | ||
36 | |||
34 | struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index, | 37 | struct 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 |
37 | static inline void acpi_gpiochip_add(struct gpio_chip *chip) { } | 40 | static inline void acpi_gpiochip_add(struct gpio_chip *chip) { } |
38 | static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { } | 41 | static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { } |
39 | 42 | ||
43 | static inline void | ||
44 | acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { } | ||
45 | |||
46 | static inline void | ||
47 | acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { } | ||
48 | |||
40 | static inline struct gpio_desc * | 49 | static inline struct gpio_desc * |
41 | acpi_get_gpiod_by_index(struct device *dev, int index, | 50 | acpi_get_gpiod_by_index(struct device *dev, int index, |
42 | struct acpi_gpio_info *info) | 51 | struct acpi_gpio_info *info) |