All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>, linux-pm@vger.kernel.org
Cc: Kevin Hilman <khilman@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Simon Horman <horms@verge.net.au>,
	Niklas Soderlund <niklas.soderlund+renesas@ragnatech.se>,
	linux-renesas-soc@vger.kernel.org,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH v2 3/3] PM / Domains: Take wakeup_path_in_band status flag into account
Date: Mon, 13 Nov 2017 16:46:43 +0100	[thread overview]
Message-ID: <1510588003-16650-4-git-send-email-ulf.hansson@linaro.org> (raw)
In-Reply-To: <1510588003-16650-1-git-send-email-ulf.hansson@linaro.org>

Make genpd to take the wakeup_path_in_band status flag into account during
system suspend/resume. More precisely, in case the flag has been set by the
PM core, let's leave the device in full power state and prevent the PM
domain from being powered off.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---

Changes in v2:
	- Added Geert's Reviewed-by tag.
	- Changed to look at status flag instead of driver flag.
---
 drivers/base/power/domain.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 24e39ce..21cbea0 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1037,7 +1037,8 @@ 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->power.wakeup_path_in_band || genpd_is_active_wakeup(genpd)))
 		return 0;
 
 	if (poweroff)
@@ -1092,7 +1093,8 @@ 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->power.wakeup_path_in_band || genpd_is_active_wakeup(genpd)))
 		return 0;
 
 	genpd_lock(genpd);
-- 
2.7.4

  parent reply	other threads:[~2017-11-13 15:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 15:46 [PATCH v2 0/3] PM / core: Invent a WAKEUP_POWERED driver flag Ulf Hansson
2017-11-13 15:46 ` [PATCH v2 1/3] PM / core: Re-factor some code dealing with parents in __device_suspend() Ulf Hansson
2017-12-06  1:01   ` Rafael J. Wysocki
2017-11-13 15:46 ` [PATCH v2 2/3] PM / core: Add IN_BAND_WAKEUP driver flag Ulf Hansson
2017-12-01 11:17   ` Vincent Guittot
2017-12-10  2:30   ` Rafael J. Wysocki
2017-12-10  9:18     ` Ulf Hansson
2017-12-10 10:16     ` Geert Uytterhoeven
2017-12-11 10:24       ` Ulf Hansson
2017-12-11 10:48         ` Geert Uytterhoeven
2017-12-11 20:59           ` Ulf Hansson
2017-12-12  8:16             ` Geert Uytterhoeven
2017-12-12 14:20               ` Ulf Hansson
2017-12-14 10:52             ` Geert Uytterhoeven
2017-12-14 14:13               ` Ulf Hansson
2017-12-14 14:27                 ` Geert Uytterhoeven
2017-11-13 15:46 ` Ulf Hansson [this message]
2017-11-13 15:50 ` [PATCH v2 0/3] PM / core: Invent a WAKEUP_POWERED " Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1510588003-16650-4-git-send-email-ulf.hansson@linaro.org \
    --to=ulf.hansson@linaro.org \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=khilman@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.