Thread (26 messages) 26 messages, 6 authors, 2022-02-11

Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain

From: Emil Renner Berthing <kernel@esmil.dk>
Date: 2022-02-01 15:16:53
Also in: linux-gpio, linux-mediatek, linux-omap, lkml

On Tue, 1 Feb 2022 at 13:19, Marc Zyngier [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/pinctrl/pinctrl-starfive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index 0b912152a405..5be9866c2b3c 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
        sfp->gc.base = -1;
        sfp->gc.ngpio = NR_GPIOS;

-       starfive_irq_chip.parent_device = dev;
        starfive_irq_chip.name = sfp->gc.label;

        sfp->gc.irq.chip = &starfive_irq_chip;
@@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
        if (ret)
                return dev_err_probe(dev, ret, "could not register gpiochip\n");

+       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
+
The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
shouldn't this be set before registering the gpio_chip with
devm_gpiochip_add_data above?
 out_pinctrl_enable:
        return pinctrl_enable(sfp->pctl);
 }
--
2.30.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help