bus: ti-sysc: Do not disable on suspend for no-idle
authorTony Lindgren <tony@atomide.com>
Thu, 2 Jul 2020 20:57:14 +0000 (13:57 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 2 Jul 2020 20:57:57 +0000 (13:57 -0700)
If we have "ti,no-idle" specified for a module we must not disable
the the module on suspend to keep things backwards compatible.

Fixes: 386cb76681ca ("bus: ti-sysc: Handle missed no-idle property in addition to no-idle-on-init")
Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/bus/ti-sysc.c

index f5a533c..4f513fa 100644 (file)
@@ -1278,7 +1278,8 @@ static int __maybe_unused sysc_noirq_suspend(struct device *dev)
 
        ddata = dev_get_drvdata(dev);
 
-       if (ddata->cfg.quirks & SYSC_QUIRK_LEGACY_IDLE)
+       if (ddata->cfg.quirks &
+           (SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE))
                return 0;
 
        return pm_runtime_force_suspend(dev);
@@ -1290,7 +1291,8 @@ static int __maybe_unused sysc_noirq_resume(struct device *dev)
 
        ddata = dev_get_drvdata(dev);
 
-       if (ddata->cfg.quirks & SYSC_QUIRK_LEGACY_IDLE)
+       if (ddata->cfg.quirks &
+           (SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE))
                return 0;
 
        return pm_runtime_force_resume(dev);