Re: USB port power off discussion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, September 21, 2012, Sarah Sharp wrote:
> On Fri, Sep 21, 2012 at 04:09:13PM -0400, Alan Stern wrote:
> > On Thu, 20 Sep 2012, Sarah Sharp wrote:
> > 
> > > Two weeks ago at Linux Plumbers Conference, I presented about the Intel
> > > Lynx Point USB port power off mechanism.  This email is a report out of
> > > what was discussed, and a kick off point for further discussion.
> > 
> > >  - Len Brown mentioned that it's likely that other types of system
> > >    devices will expose power resources in the same way it's done for USB
> > >    devices.  Rafael Wysocki mentioned that it would be nice to get a
> > >    more generic representation of the power resources into struct
> > >    device.
> > 
> > Indeed, this is very similar in some ways to the work that Aaron Lu is 
> > doing for his "Zero-Power Optical Disc Drives" series of patches.  The 
> > idea is that newer CD/DVD drives can be powered off completely, and 
> > they will still notify the system when the user presses a button or 
> > opens the drive door.
> > 
> > Perhaps we should think about including the "power-off" concept into 
> > the PM core.  Given that it will be used by more than one subsystem, 
> > this seems like the best place for it.
> 
> Perhaps we need a mechanism in the PM core for a subsystem to specify
> whether power off prevents wakeup?

I've been thinking about that for quite a while now and it all sounds to me
like PM QoS requirements.

I'm generally against treating "power off" in a special way, because in the
big picture it's just one of the available low-power states (it may be the only
one).  Now the difference between "power off" and the other low-power states
it's just that the device can't do anything when power has been removed from
it, while in the other low-power states it can do _something_.  Still, though,
the thing it can do in the other low-power states may not be the one we'd
like it to be able to do, so to speak.  So all of the "let's put the power-off
concept into the core" ideas seem to be conceptually wrong to me.

Except that there are specifications like the ZPODD thing Alan mentioned above
that make "power off" a special case for us and we have no choice but to
deal with it.

So, my current idea is why don't we handle that through PM QoS?  I mean we have
a means to specify per-device PM QoS wakeup latency constraits and expose it to
user space on a per-device basis.  I suppose we can we can handle the
"don't remove power from this device" requirement in a similar way, i.e. add
something like per-device PM QoS flags specifying binary requirements regarding the
low-power states the device can be put into by ACPI or another platform-dependent
mechanism, like "the state to go into cannot be zero power", "remote wakeup is
required" etc.

Then, whoever has any requirements of this kind regarding the low-power states
the device can be put into, including user space, will be able to add a
PM QoS request with the approriate flags set and the effective mask of PM
QoS flags used for the given device will be the bitwise OR of all the added
constraints.

What do you think?

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux