regulator: BD71837 PMIC resume during noirq phase?

Martin Kepplinger martin.kepplinger at puri.sm
Tue Jun 14 02:57:18 PDT 2022


Am Dienstag, dem 14.06.2022 um 10:18 +0100 schrieb Mark Brown:
> On Tue, Jun 14, 2022 at 11:06:06AM +0200, Martin Kepplinger wrote:
> 
> > and regulator_enable() in imx-pgc is called from
> > genpd_resume_noirq().
> > 
> > At this point, does any workaround or fix come to your mind I could
> > test? I guess i2c needs to be resumed too...
> > 
> > Why does power domain only implement resume_noirq? How could I
> > untangle
> > this?
> 
> Indeed - if a power domain is controlling regulators then I'd not
> expect
> things to go well if it tries to resume without interrupts, there
> will
> be some things that can be done purely with GPIOs but that's
> depending
> on the hardware having wired things up that way and the operations
> needed by the power domain mapping well onto what can be done with
> GPIOs.

and what's the danger when resuming power domains later?:

--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2062,8 +2062,8 @@ int pm_genpd_init(struct generic_pm_domain
*genpd,
        genpd->domain.ops.runtime_suspend = genpd_runtime_suspend;
        genpd->domain.ops.runtime_resume = genpd_runtime_resume;
        genpd->domain.ops.prepare = genpd_prepare;
-       genpd->domain.ops.suspend_noirq = genpd_suspend_noirq;
-       genpd->domain.ops.resume_noirq = genpd_resume_noirq;
+       genpd->domain.ops.suspend = genpd_suspend_noirq;
+       genpd->domain.ops.resume = genpd_resume_noirq;
        genpd->domain.ops.freeze_noirq = genpd_freeze_noirq;
        genpd->domain.ops.thaw_noirq = genpd_thaw_noirq;
        genpd->domain.ops.poweroff_noirq = genpd_poweroff_noirq;


thanks for taking the time,

                          martin





More information about the linux-arm-kernel mailing list