diff options
author | David Brownell <david-b@pacbell.net> | 2005-09-12 19:39:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 09:52:50 -0700 |
commit | 0ac85241ebc7bf6b86ab498960cc121d53ef69ae (patch) | |
tree | 8b5d9d5a3e475c49d771d1a4bd597ea561331ff7 /drivers/base/core.c | |
parent | 2a7ff1feda9f5cd6463744239ec5e661ee7d5f01 (diff) | |
download | op-kernel-dev-0ac85241ebc7bf6b86ab498960cc121d53ef69ae.zip op-kernel-dev-0ac85241ebc7bf6b86ab498960cc121d53ef69ae.tar.gz |
[PATCH] driver model wakeup flags
This is a refresh of an earlier patch to add "wakeup" support to the
PM core model. This provides per-device bus-neutral control of the
use of wakeup events.
* "struct device_pm_info" has two bits that are initialized as
part of setting up the enclosing struct device:
- "can_wakeup", reflecting hardware capabilities
- "may_wakeup", the policy setting (when CONFIG_PM)
* There's a writeable sysfs "wakeup" file, with one of two values:
- "enabled", when the policy is to allow wakeup
- "disabled", when the policy is not to allow it
- "" if the device can't currently issue wakeups
By default, wakeup is enabled on all devices that support it. If its
driver doesn't support it ... treat it as a bug. :)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 6ab73f5..3110919 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -225,6 +225,7 @@ void device_initialize(struct device *dev) klist_children_put); INIT_LIST_HEAD(&dev->dma_pools); init_MUTEX(&dev->sem); + device_init_wakeup(dev, 0); } /** |