From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Mason <slash.tmp@free.fr>, Pavel Machek <pavel@ucw.cz>,
linux-kernel@vger.kernel.org,
"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>,
Kevin Hilman <khilman@kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC 1/2] PM / suspend: Add platform_suspend_target_state()
Date: Sun, 16 Jul 2017 15:38:32 +0200 [thread overview]
Message-ID: <20170716133832.mnuaie4jnlwu6dwj@piout.net> (raw)
In-Reply-To: <3675920.H2f5xgTCgu@aspire.rjw.lan>
On 16/07/2017 at 12:22:08 +0200, Rafael J. Wysocki wrote:
> On Saturday, July 15, 2017 07:36:21 PM Florian Fainelli wrote:
> >
> > On 07/15/2017 04:38 PM, Rafael J. Wysocki wrote:
> > > On Sunday, July 16, 2017 01:34:53 AM Mason wrote:
> > >> On 16/07/2017 01:24, Rafael J. Wysocki wrote:
> > >>
> > >>> On Saturday, July 15, 2017 10:20:27 AM Florian Fainelli wrote:
> > >>>
> > >>>> The enum offers the advantage of centralizing how many different states
> > >>>> exist for all the platforms we know about in the kernel, it's easy to
> > >>>> define common values for platforms that have the same semantics, just
> > >>>> like it's simple to add new values for platform specific details.
> > >>>
> > >>> Well, you seem to be liking this, so why don't you just implement it?
> > >>
> > >> At the end of his message, Florian wrote:
> > >>
> > >>> In any case, just agree and I will be happy to follow-up with patches.
> > >
> > > But it may be hard to convince everybody without posting code changes
> > > and often enough showing a patch makes a good argument.
> >
> > I had the patches ready last night, saw the emails this morning and
> > decided to go mountain bike for a bit to think about it some more. You
> > will find my follow-up patches that hopefully implement your recommendation.
>
> OK, thanks!
>
> There is one problem with this I missed before, though, sorry about that.
>
> Drivers need to be able to distinguish between suspend-to-idle and the platform
> states too, so we need to store the argument passed to suspend_devices_and_enter()
> somewhere too, either in the core or in the platform code.
>
> And if we need to store it anyway, let's just store it in the core in a global var
> (say pm_suspend_target_state), export that and be done.
>
> There still will be a concern regarding drivers that care about differences between
> PM_SUSPEND_MEM and PM_SUSPEND_STANDBY, because those differences are
> platform-dependent, but let's defer addressing this until we have a driver
> that needs to run on different platforms with different definitions for those
> things.
>
We already have the case for drivers/net/ethernet/cadence/ and
drivers/net/can/m_can/ and many of the at91 drivers. Depending on the
specific SoC they run on, PM_SUSPEND_MEM may or may not cut VDDcore or
may or may not change the peripheral clock.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2017-07-16 13:38 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 [this message]
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
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=20170716133832.mnuaie4jnlwu6dwj@piout.net \
--to=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=rjw@rjwysocki.net \
--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).