aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gpio
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-11-07 13:15:50 -0500
committerLinus Walleij <linus.walleij@linaro.org>2017-11-08 08:08:46 -0500
commit39e5f0969514fbfd6c235ac52586c72ca77cee00 (patch)
tree4b9fdd0fb1eccb99798694a1b300173ace1d308c /include/linux/gpio
parent3634eeb0fe9176e453c99834749dce21ea1305c1 (diff)
gpio: Move irq_chained_parent to struct gpio_irq_chip
In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r--include/linux/gpio/driver.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 1367fa94105f..86f00d908e90 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -77,6 +77,21 @@ struct gpio_irq_chip {
77 * interrupt. 77 * interrupt.
78 */ 78 */
79 void *parent_handler_data; 79 void *parent_handler_data;
80
81 /**
82 * @num_parents:
83 *
84 * The number of interrupt parents of a GPIO chip.
85 */
86 unsigned int num_parents;
87
88 /**
89 * @parents:
90 *
91 * A list of interrupt parents of a GPIO chip. This is owned by the
92 * driver, so the core will only reference this list, not modify it.
93 */
94 unsigned int *parents;
80}; 95};
81 96
82static inline struct gpio_irq_chip *to_gpio_irq_chip(struct irq_chip *chip) 97static inline struct gpio_irq_chip *to_gpio_irq_chip(struct irq_chip *chip)
@@ -148,9 +163,6 @@ static inline struct gpio_irq_chip *to_gpio_irq_chip(struct irq_chip *chip)
148 * safely. 163 * safely.
149 * @bgpio_dir: shadowed direction register for generic GPIO to clear/set 164 * @bgpio_dir: shadowed direction register for generic GPIO to clear/set
150 * direction safely. 165 * direction safely.
151 * @irq_chained_parent: GPIO IRQ chip parent/bank linux irq number,
152 * provided by GPIO driver for chained interrupt (not for nested
153 * interrupts).
154 * @irq_nested: True if set the interrupt handling is nested. 166 * @irq_nested: True if set the interrupt handling is nested.
155 * @irq_need_valid_mask: If set core allocates @irq_valid_mask with all 167 * @irq_need_valid_mask: If set core allocates @irq_valid_mask with all
156 * bits set to one 168 * bits set to one
@@ -226,7 +238,6 @@ struct gpio_chip {
226 * With CONFIG_GPIOLIB_IRQCHIP we get an irqchip inside the gpiolib 238 * With CONFIG_GPIOLIB_IRQCHIP we get an irqchip inside the gpiolib
227 * to handle IRQs for most practical cases. 239 * to handle IRQs for most practical cases.
228 */ 240 */
229 unsigned int irq_chained_parent;
230 bool irq_nested; 241 bool irq_nested;
231 bool irq_need_valid_mask; 242 bool irq_need_valid_mask;
232 unsigned long *irq_valid_mask; 243 unsigned long *irq_valid_mask;