On Mon, 2 Oct 2006, Oliver Neukum wrote:
> Am Montag, 2. Oktober 2006 16:17 schrieb Alan Stern:
> > On Mon, 2 Oct 2006, Oliver Neukum wrote:
> >
> > > Hi,
> > >
> > > I've tried the power save states 1 to 3, and got these results:
> > > 1 -> 0
> > > 2 -> 2
> > > 3 -> 2
> > >
> > > What is causing this and is it acceptable?
> >
> > This is explained in Documentation/power/devices.txt. Briefly, in the
> > power/state file all non-zero values are displayed as "2". Only the
> > values 0, 2, or 3 are accepted for writing, and both 2 and 3 get mapped to
> > PM_EVENT_SUSPEND.
> >
> > Alan Stern
>
> In this case the use of language is very subtle. I quote:
>
> In each device's directory, there is a 'power' directory, which
> contains at least a 'state' file. Reading from this file displays what
> power state the device is currently in. Writing to this file initiates
> a transition to the specified power state, which must be a decimal in
> the range 1-3, inclusive; or 0 for 'On'.
Look at lines 507-529. Quote:
/sys/devices/.../power/state files
==================================
For now you can also test some of this functionality using sysfs.
DEPRECATED: USE "power/state" ONLY FOR DRIVER TESTING, AND
AVOID USING dev->power.power_state IN DRIVERS.
THESE WILL BE REMOVED. IF THE "power/state" FILE GETS REPLACED,
IT WILL BECOME SOMETHING COUPLED TO THE BUS OR DRIVER.
In each device's directory, there is a 'power' directory, which contains
at least a 'state' file. The value of this field is effectively boolean,
PM_EVENT_ON or PM_EVENT_SUSPEND.
* Reading from this file displays a value corresponding to
the power.power_state.event field. All nonzero values are
displayed as "2", corresponding to a low power state; zero
is displayed as "0", corresponding to normal operation.
* Writing to this file initiates a transition using the
specified event code number; only '0', '2', and '3' are
accepted (without a newline); '2' and '3' are both
mapped to PM_EVENT_SUSPEND.
Alan Stern
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel