[linux-pm] [patch 2.6.13-rc5] driver model wakeup support

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

 



On Tue, 2 Aug 2005, David Brownell wrote:

> Here's a refresh of my driver model wakeup patch.  Two
> changes from last time:
> 
>   - It sets up USB too, not just PCI.  So keyboards and hubs,
>     plus a few network adapters, will have these attributes.
> 
>   - Only devices that are known to have wakeup capabilities
>     have the attribute.   So "find /sys/devices -name wakeup"
>     returns only "interesting" devices.
> 
> At this time, wakeup mechanisms need to be explicitly enabled
> in userspace code; so this is in a sense a policy setting API
> affecting runtime (and suspend-to-ram time) device-specific PM.
> 
> There will be some usbcore changes to follow this, assuming
> this gets on the 2.6.14 train ... replacing current kluges.

Nice to see this finally get into the kernel.

The PCI part of this patch should try to use ACPI to identify devices
capable of platform-specific non-PME wakeup signalling.  I don't have the
faintest idea how to do this; maybe Len can help.

> +#define device_set_wakeup_enable(dev,val) \
> +       ((dev)->power.should_wakeup = (dev)->power.can_wakeup ? !!(val) : 0)

This can be simplified to:

+#define device_set_wakeup_enable(dev,val) \
+       ((dev)->power.should_wakeup = ((dev)->power.can_wakeup && val));

Alan Stern


[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