From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
linux-pm@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>,
khilman@linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, k.kozlowski@samsung.com
Subject: Re: [PATCH] PM / Domains: restore calling of .suspend/resume_noirq() callbacks
Date: Thu, 13 Nov 2014 02:33:42 +0100 [thread overview]
Message-ID: <2997289.NEH22PNoYM@vostro.rjw.lan> (raw)
In-Reply-To: <1415808047-23455-1-git-send-email-grygorii.strashko@ti.com>
On Wednesday, November 12, 2014 06:00:47 PM Grygorii Strashko wrote:
> Now .suspend/resume_noirq() callbacks will not be called during
> system wide suspend/resume for devices which belongs to some GPD.
> It seems, that this change was accidently introduced by
> commit d23b9b00cdde ("PM / Domains: Rework system suspend callback
> routines (v2)").
I'm not sure if that was really accidentally.
Can you describe the problem that the change below is attempting to
address, without going to much into the history? IOW, what's that
doesn't work right now?
> This patch restores calling of .suspend/resume_noirq() callbacks
> for devices from GPD during system wide suspend/resume.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
> drivers/base/power/domain.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index fb83d4a..f8c70e6 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -1014,6 +1014,7 @@ static int pm_genpd_suspend_late(struct device *dev)
> static int pm_genpd_suspend_noirq(struct device *dev)
> {
> struct generic_pm_domain *genpd;
> + int ret;
>
> dev_dbg(dev, "%s()\n", __func__);
>
> @@ -1021,8 +1022,14 @@ static int pm_genpd_suspend_noirq(struct device *dev)
> if (IS_ERR(genpd))
> return -EINVAL;
>
> - if (genpd->suspend_power_off
> - || (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)))
> + if (genpd->suspend_power_off)
> + return 0;
> +
> + ret = pm_generic_suspend_noirq(dev);
> + if (ret)
> + return ret;
> +
> + if (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev))
> return 0;
>
> genpd_stop_dev(genpd, dev);
> @@ -1065,8 +1072,9 @@ static int pm_genpd_resume_noirq(struct device *dev)
> */
> pm_genpd_sync_poweron(genpd);
> genpd->suspended_count--;
> + genpd_start_dev(genpd, dev);
>
> - return genpd_start_dev(genpd, dev);
> + return pm_generic_resume_noirq(dev);
> }
>
> /**
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2014-11-13 1:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 16:00 Grygorii Strashko
2014-11-13 1:33 ` Rafael J. Wysocki [this message]
2014-11-13 18:43 ` Grygorii Strashko
2014-11-13 19:11 ` Geert Uytterhoeven
2014-11-13 19:30 ` Grygorii Strashko
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=2997289.NEH22PNoYM@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=grygorii.strashko@ti.com \
--cc=k.kozlowski@samsung.com \
--cc=khilman@linaro.org \
--cc=len.brown@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=ulf.hansson@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®