[linux-pm] [RFC] Tying sysfs "wakeup" file to platform-level handler
Deepak Saxena
dsaxena at plexity.net
Mon Nov 24 14:02:34 PST 2008
On Nov 24 2008, at 16:34, Alan Stern was caught saying:
> On Mon, 24 Nov 2008, Deepak Saxena wrote:
>
> > Ack. This is what we are already doing. The decision on whether or
> > not a device should wake us up from suspend is handle via OHM on the
> > XO and we set the OLPC-specific flags in /sys/power/wakeup_events as
> > there is no standard way to specify wakeup events from userland.
> >
> > My proposal uses the existing sysfs interface to connect into a platform
> > level handler that can set the appropriate low-level HW bits. The
> > decision of whether or not to enable the device's wakeup capability
> > would still be left to user space.
>
> Then I must have misunderstood the point of your earlier message. Are
> you saying that the real problem is to tie the existing
> /sys/devices/.../power/wakeup flags into your platform handler?
ACK.
> The sources you listed (ac_power, battery_state, and so on) are all
> pretty much platform-level entities to begin with. Their drivers must
> already contain or communicate with a fair amount of platform-level
> code. So why should there be any trouble about adding a new
> communication channel for wakeup settings?
Because some of the drivers we are using are generic and I do not want
to put a bunch of platform-specific code in there. Let's look at the PS2
driver for example. We use the generic i8042 driver and I would like
to be able to use /sys/bus/platform/devices/i8042/power/wakeup to set
wakeup enable on mouse or keyboard input so I need a way to trigger
an EC mask update on a write to that file.
Maybe there is some other way to do this that I don't quite grok?
Right now, the i8042 device does not have the can_wakeup flag set
so writing either "enabled" or "disabled" leads to -EINVAL.
~Deepak
--
Deepak Saxena http://www.greenbasement.info
_____ __o Kernel Hacker, One Laptop Per Child (o>
------ -\<, Give One Laptop, Get One Laptop //\
----- ( )/ ( ) http://www.amazon.com/xo V_/_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the linux-pm
mailing list