diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2022-07-18 11:58:09 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2022-07-18 11:58:09 +0200 |
commit | 4a2d4e2df5a58c5a1feb6a46ba276c373ae0f17d (patch) | |
tree | e60819c4d412a40d8ed26118779db9c3c6085be4 /drivers/pinctrl | |
parent | 5d11f8392b54e9918bd985bd204d45436a3efdf3 (diff) | |
download | linux-stable-4a2d4e2df5a58c5a1feb6a46ba276c373ae0f17d.tar.gz linux-stable-4a2d4e2df5a58c5a1feb6a46ba276c373ae0f17d.tar.bz2 linux-stable-4a2d4e2df5a58c5a1feb6a46ba276c373ae0f17d.zip |
Revert "pinctrl: qcom: spmi-gpio: make the irqchip immutable"
This reverts commit 7542766e78fc374d81d8c2db214c4b4308645277.
It was noted during follow-up that the approach is incorrect.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c index 884a57c812db..30baeb4ff2de 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c @@ -171,6 +171,7 @@ struct pmic_gpio_state { struct regmap *map; struct pinctrl_dev *ctrl; struct gpio_chip chip; + struct irq_chip irq; u8 usid; u8 pid_base; }; @@ -987,17 +988,6 @@ static void *pmic_gpio_populate_parent_fwspec(struct gpio_chip *chip, return fwspec; } -static const struct irq_chip spmi_gpio_irq_chip = { - .name = "spmi-gpio", - .irq_ack = irq_chip_ack_parent, - .irq_mask = irq_chip_mask_parent, - .irq_unmask = irq_chip_unmask_parent, - .irq_set_type = irq_chip_set_type_parent, - .irq_set_wake = irq_chip_set_wake_parent, - .flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND, - GPIOCHIP_IRQ_RESOURCE_HELPERS, -}; - static int pmic_gpio_probe(struct platform_device *pdev) { struct irq_domain *parent_domain; @@ -1091,8 +1081,16 @@ static int pmic_gpio_probe(struct platform_device *pdev) if (!parent_domain) return -ENXIO; + state->irq.name = "spmi-gpio", + state->irq.irq_ack = irq_chip_ack_parent, + state->irq.irq_mask = irq_chip_mask_parent, + state->irq.irq_unmask = irq_chip_unmask_parent, + state->irq.irq_set_type = irq_chip_set_type_parent, + state->irq.irq_set_wake = irq_chip_set_wake_parent, + state->irq.flags = IRQCHIP_MASK_ON_SUSPEND, + girq = &state->chip.irq; - gpio_irq_chip_set_chip(girq, &spmi_gpio_irq_chip); + girq->chip = &state->irq; girq->default_type = IRQ_TYPE_NONE; girq->handler = handle_level_irq; girq->fwnode = of_node_to_fwnode(state->dev->of_node); |