Thread (14 messages) 14 messages, 3 authors, 2018-01-02

Re: [PATCH v2 3/4] PM / Domains: Take WAKEUP_PATH driver flag into account in genpd

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2017-12-30 00:47:34
Also in: linux-renesas-soc

On Fri, Dec 29, 2017 at 12:37 PM, Ulf Hansson [off-list ref] wrote:
quoted hunk ↗ jump to hunk
In case the WAKEUP_PATH flag has been set in a later phase than from the
->suspend() callback, the PM core don't set the ->power.wakeup_path status
flag for the device. Therefore, let's be safe and check it explicitly.

Signed-off-by: Ulf Hansson <redacted>
---
 drivers/base/power/domain.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index f9dcc98..32b4ba7 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1038,7 +1038,9 @@ static int genpd_finish_suspend(struct device *dev, bool poweroff)
        if (IS_ERR(genpd))
                return -EINVAL;

-       if (dev->power.wakeup_path && genpd_is_active_wakeup(genpd))
+       if ((dev->power.wakeup_path ||
+           dev_pm_test_driver_flags(dev, DPM_FLAG_WAKEUP_PATH)) &&
Shouldn't dev->power.wakeup_path be always set if DPM_FLAG_WAKEUP_PATH
is set as per the second patch in the series?
quoted hunk ↗ jump to hunk
+           genpd_is_active_wakeup(genpd))
                return 0;

        if (poweroff)
@@ -1093,7 +1095,9 @@ static int genpd_resume_noirq(struct device *dev)
        if (IS_ERR(genpd))
                return -EINVAL;

-       if (dev->power.wakeup_path && genpd_is_active_wakeup(genpd))
+       if ((dev->power.wakeup_path ||
+           dev_pm_test_driver_flags(dev, DPM_FLAG_WAKEUP_PATH)) &&
+           genpd_is_active_wakeup(genpd))
                return 0;

        genpd_lock(genpd);
--
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help