Patch "pinctrl: starfive: jh7110: Fix failure to set irq after CONFIG_PM is enabled" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    pinctrl: starfive: jh7110: Fix failure to set irq after CONFIG_PM is enabled

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pinctrl-starfive-jh7110-fix-failure-to-set-irq-after.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f87ec58d56954690582dba39e5247126665f29cb
Author: Hal Feng <hal.feng@xxxxxxxxxxxxxxxx>
Date:   Tue Sep 5 20:21:04 2023 +0800

    pinctrl: starfive: jh7110: Fix failure to set irq after CONFIG_PM is enabled
    
    [ Upstream commit 8406d6b5916663b4edc604b3effbf4935b61c2da ]
    
    The issue was found when we enabled CONFIG_PM and tested edge events using
    libgpiod.
    
    > # gpiomon -r gpiochip0 55
    > gpiomon: error waiting for events: Permission denied
    
    `gpiomon` will call irq_chip_pm_get() and then call pm_runtime_resume_and_get()
    if (IS_ENABLED(CONFIG_PM) && sfp->gc.irq.domain->pm_dev).
    pm_runtime_resume_and_get() will fail if the runtime pm of pinctrl device
    is disabled.
    
    As we expect the pinctrl driver can be always working and never suspend
    during runtime, unset sfp->gc.irq.domain->pm_dev to make sure
    pm_runtime_resume_and_get() won't be called when setting irq.
    
    Fixes: 447976ab62c5 ("pinctrl: starfive: Add StarFive JH7110 sys controller driver")
    Signed-off-by: Hal Feng <hal.feng@xxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230905122105.117000-2-hal.feng@xxxxxxxxxxxxxxxx
    Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
index 5fe729b4a03de..72747ad497b5e 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
@@ -968,8 +968,6 @@ int jh7110_pinctrl_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);
-
 	dev_info(dev, "StarFive GPIO chip registered %d GPIOs\n", sfp->gc.ngpio);
 
 	return pinctrl_enable(sfp->pctl);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux