[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171108010222.GS28152@atomide.com>
Date: Tue, 7 Nov 2017 17:02:22 -0800
From: Tony Lindgren <tony@...mide.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
linux-gpio@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
ckeepax@...nsource.wolfsonmicro.com, swarren@...dia.com,
andy.shevchenko@...il.com, alcooperx@...il.com,
bcm-kernel-feedback-list@...adcom.com, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 0/2] pinctrl: Allow indicating loss of state across
suspend/resume
* Rafael J. Wysocki <rjw@...ysocki.net> [171108 00:25]:
> On Tuesday, November 7, 2017 5:00:06 PM CET Tony Lindgren wrote:
> > For runtime PM, restoring the state constantly is unnecessary and not
> > good for battery life. The logic can be just:
> >
> > 1. Device driver runtime PM suspend saves the state when needed
> >
> > 2. Device driver runtime PM resume checks if context_lost was set by
> > the bus or power domain code
> >
> > 3. If context was lost, device driver restores the state, or in some
> > cases may need re-run the driver register init related parts
> > to bring the driver back up, then clears the context_lost flag
> >
> > How about something like the following patch? So far only compile
> > tested with CONFIG_PM enabled. If that looks like the way to go,
> > I'll test it properly and add some comments for the functions and
> > post a proper patch :)
>
> Honestly, I'm not sure.
>
> I'd rather have a context_lost flag to start with and see how/if
> drivers will use that before adding any common infra for handling
> this.
Right, I'll provide some use cases but it will be a little while.
Currently it's done in non-generic way at the interconnect code
for my use cases:
$ git grep "\.context_offs = " arch/arm/mach-omap2/*data.c | wc -l
276
It seems that we could have genpd take care of this in a generic
way with the patch I posted.
Regards,
Tony
Powered by blists - more mailing lists