lkml.org 
[lkml]   [2015]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] PM / Runtime: runtime: Add sysfs option for forcing runtime suspend
On Fri, 25 Sep 2015, Rafael J. Wysocki wrote:

> On Friday, September 25, 2015 10:29:55 AM Alan Stern wrote:
> > On Fri, 25 Sep 2015, Rafael J. Wysocki wrote:
> >
> > > We are missing the "no remote wakeup" bit now (well, there is a PM QoS flag,
> > > but it isn't very useful, so I'd prefer to replace it with a "no remote wakeup"
> > > bit in struct dev_pm_info or something similar).
> > >
> > > That is actually quite important, because (a) we can save energy but not
> > > configuring the device to do remote wakeup in the first place and (b) that
> > > may involve more than just the driver (for example, disabling PCI or ACPI
> > > remote wakeup involves the bus type or similar).
> > >
> > > So it looks like we need to be able to distinguish between "runtime suspend
> > > with remote wakeup" and "runtime suspend without remote wakeup".
> > >
> > > And if we do the latter, we may not even need the "inhibit" thing any more,
> > > because suspended devices without that are not configured to do remote wakeup
> > > cannot really signal anything in the majority of cases.
> >
> > That works only for drivers that use autosuspend to go to low power in
> > between events. It doesn't work for drivers that remain at full power
> > as long as the device file is open. That kind of driver does require
> > an "inhibit" interface.
>
> Or an interface allowing user space to trigger pm_request_idle() for them.
>
> So user space would change the "no remote wakeup" setting and then do the
> "try to suspend now" thing.

So something like:

echo on >/sys/.../power/control (in case the device was
already in runtime suspend with wakeups enabled)
echo off >/sys/.../power/wakeup
echo auto >/sys/.../power/control

This should work. But it would require that the driver doesn't
increment the usage counter when the device file is opened. I can
imagine this might lead to trouble if you're dealing with hardware that
doesn't support remote wakeup very well. The driver wouldn't be able
to work around the hardware issue by incrementing the usage counter.

In real life this might not be a serious issue. I don't know.

Alan Stern



\
 
 \ /
  Last update: 2015-09-25 23:41    [W:0.647 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site