mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
gpio: Move irq_valid_mask into 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 <[email protected]> Acked-by: Grygorii Strashko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
dc6bafee86
commit
dc7b0387ee
8 changed files with 35 additions and 26 deletions
|
|
@ -1660,7 +1660,7 @@ static void byt_gpio_irq_init_hw(struct byt_gpio *vg)
|
|||
|
||||
value = readl(reg);
|
||||
if (value & BYT_DIRECT_IRQ_EN) {
|
||||
clear_bit(i, gc->irq_valid_mask);
|
||||
clear_bit(i, gc->irq.valid_mask);
|
||||
dev_dbg(dev, "excluding GPIO %d from IRQ domain\n", i);
|
||||
} else if ((value & BYT_PIN_MUX) == byt_get_gpio_mux(vg, i)) {
|
||||
byt_gpio_clear_triggering(vg, i);
|
||||
|
|
@ -1703,7 +1703,7 @@ static int byt_gpio_probe(struct byt_gpio *vg)
|
|||
gc->can_sleep = false;
|
||||
gc->parent = &vg->pdev->dev;
|
||||
gc->ngpio = vg->soc_data->npins;
|
||||
gc->irq_need_valid_mask = true;
|
||||
gc->irq.need_valid_mask = true;
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
vg->saved_context = devm_kcalloc(&vg->pdev->dev, gc->ngpio,
|
||||
|
|
|
|||
|
|
@ -1584,7 +1584,7 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
|
|||
chip->label = dev_name(pctrl->dev);
|
||||
chip->parent = pctrl->dev;
|
||||
chip->base = -1;
|
||||
chip->irq_need_valid_mask = need_valid_mask;
|
||||
chip->irq.need_valid_mask = need_valid_mask;
|
||||
|
||||
ret = devm_gpiochip_add_data(pctrl->dev, chip, pctrl);
|
||||
if (ret) {
|
||||
|
|
@ -1616,7 +1616,7 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
|
|||
intsel >>= CHV_PADCTRL0_INTSEL_SHIFT;
|
||||
|
||||
if (need_valid_mask && intsel >= pctrl->community->nirqs)
|
||||
clear_bit(i, chip->irq_valid_mask);
|
||||
clear_bit(i, chip->irq.valid_mask);
|
||||
}
|
||||
|
||||
/* Clear all interrupts */
|
||||
|
|
|
|||
Loading…
Reference in a new issue