Re: [RFC] Tying sysfs "wakeup" file to platform-level handler

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

 



On Monday, 24 of November 2008, Deepak Saxena wrote:
> 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.

For PCI we set the can_wakeup flag during the initialization of devices.

For some other devices, ACPI BIOS contains information telling us whether
they are capable of waking the system up and the ACPI code sets that flag for
them on this basis.

Does your platform know which devices can wake up?

Rafael
 
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux