From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-pm <linux-pm@vger.kernel.org>,
Thibaud Cornic <thibaud_cornic@sigmadesigns.com>,
JB <jb_lescher@sigmadesigns.com>, Mason <slash.tmp@free.fr>,
Kevin Hilman <khilman@kernel.org>, Pavel Machek <pavel@ucw.cz>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC 2/2] soc: bcm: brcmstb: PM: Implement target_state callback
Date: Fri, 30 Jun 2017 01:04:35 +0200 [thread overview]
Message-ID: <48358346.FqHa0fcY05@aspire.rjw.lan> (raw)
In-Reply-To: <20170623010837.11199-3-f.fainelli@gmail.com>
On Thursday, June 22, 2017 06:08:37 PM Florian Fainelli wrote:
> Provide a target_state callback implementation which just returns the
> suspend_state_t the system is about to enter. Broadcom STB drivers can
> utilize platform_suspend_target_state() to retrieve that and take
> appropriate actions (e.g: full vs. partial re-initialization).
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/soc/bcm/brcmstb/pm/pm-arm.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/soc/bcm/brcmstb/pm/pm-arm.c b/drivers/soc/bcm/brcmstb/pm/pm-arm.c
> index 4b7e6c297b23..7d4695734093 100644
> --- a/drivers/soc/bcm/brcmstb/pm/pm-arm.c
> +++ b/drivers/soc/bcm/brcmstb/pm/pm-arm.c
> @@ -104,6 +104,7 @@ struct brcmstb_pm_control {
> u32 phy_b_standby_ctrl_offs;
> bool needs_ddr_pad;
> struct platform_device *pdev;
> + suspend_state_t pm_state;
I wouldn't use suspend_state_t here, because the mapping between those
things and real platform power states is somewhat arbitrary and totally
platform-specific.
It's better to define symbols representing platform power states for your
platform (or use an enum) and then use those symbols in the drivers IMO.
Thanks,
Rafael
next prev parent reply other threads:[~2017-06-29 23:12 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170622085102.mpk7vxodpgxtrlfd@piout.net>
2017-06-23 1:08 ` [RFC 0/2] PM / suspend: Add platform_suspend_target_state() Florian Fainelli
2017-06-23 1:08 ` [RFC 1/2] " Florian Fainelli
2017-06-29 23:00 ` Rafael J. Wysocki
2017-07-12 18:08 ` Florian Fainelli
2017-07-14 22:16 ` Rafael J. Wysocki
2017-07-15 6:28 ` Pavel Machek
2017-07-15 12:17 ` Rafael J. Wysocki
2017-07-15 16:46 ` Pavel Machek
2017-07-15 17:20 ` Florian Fainelli
2017-07-15 18:33 ` Alexandre Belloni
2017-07-06 3:18 ` Pavel Machek
2017-07-16 13:41 ` Alexandre Belloni
2017-07-16 15:35 ` Florian Fainelli
2017-07-15 23:24 ` Rafael J. Wysocki
2017-07-15 23:34 ` Mason
2017-07-15 23:38 ` Rafael J. Wysocki
2017-07-16 2:36 ` Florian Fainelli
2017-07-16 10:22 ` Rafael J. Wysocki
2017-07-16 13:38 ` Alexandre Belloni
2017-07-16 18:24 ` Pavel Machek
2017-07-16 15:41 ` Florian Fainelli
2017-07-15 23:29 ` Rafael J. Wysocki
2017-07-06 3:17 ` Pavel Machek
2017-07-16 10:28 ` Rafael J. Wysocki
2017-07-16 18:22 ` Pavel Machek
2017-06-23 1:08 ` [RFC 2/2] soc: bcm: brcmstb: PM: Implement target_state callback Florian Fainelli
2017-06-29 23:04 ` Rafael J. Wysocki [this message]
2017-07-16 2:36 ` [PATCH 0/2] PM / suspend: Add platform_suspend_target_state() Florian Fainelli
2017-07-16 2:36 ` [PATCH 1/2] " Florian Fainelli
2017-07-06 3:18 ` Pavel Machek
2017-07-16 15:41 ` Florian Fainelli
2017-07-16 10:30 ` Rafael J. Wysocki
2017-07-16 2:36 ` [PATCH 2/2] soc: bcm: brcmstb: PM: Implement target_state callback Florian Fainelli
2017-07-17 20:06 ` [PATCH v2] PM / suspend: Add suspend_target_state() Florian Fainelli
2017-07-17 20:16 ` Pavel Machek
2017-07-17 21:03 ` Rafael J. Wysocki
2017-07-17 21:21 ` Florian Fainelli
2017-07-20 8:03 ` Pavel Machek
2017-07-17 22:10 ` [PATCH v3] PM / suspend: Export pm_suspend_target_state Florian Fainelli
2017-07-17 23:24 ` Rafael J. Wysocki
2017-07-18 0:19 ` [PATCH v4] " Florian Fainelli
2017-07-24 20:55 ` Rafael J. Wysocki
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=48358346.FqHa0fcY05@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=alexandre.belloni@free-electrons.com \
--cc=daniel.lezcano@linaro.org \
--cc=f.fainelli@gmail.com \
--cc=jb_lescher@sigmadesigns.com \
--cc=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=slash.tmp@free.fr \
--cc=thibaud_cornic@sigmadesigns.com \
--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;
as well as URLs for NNTP newsgroup(s).