Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105363
b: refs/heads/master
c: 8111d1b
h: refs/heads/master
i:
  105361: 07c39f3
  105359: bcfc075
v: v3
  • Loading branch information
Alan Stern authored and Linus Torvalds committed Jul 24, 2008
1 parent 728939c commit b61c3af
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c363265d57d755e62053e9f69a1f2164e83f7ea
refs/heads/master: 8111d1b552349921aae1acf73e4e8cea98e80970
37 changes: 35 additions & 2 deletions trunk/include/linux/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,21 @@ struct pm_ext_ops {
* RECOVER Creation of a hibernation image or restoration of the main
* memory contents from a hibernation image has failed, call
* ->thaw() and ->complete() for all devices.
*
* The following PM_EVENT_ messages are defined for internal use by
* kernel subsystems. They are never issued by the PM core.
*
* USER_SUSPEND Manual selective suspend was issued by userspace.
*
* USER_RESUME Manual selective resume was issued by userspace.
*
* REMOTE_WAKEUP Remote-wakeup request was received from the device.
*
* AUTO_SUSPEND Automatic (device idle) runtime suspend was
* initiated by the subsystem.
*
* AUTO_RESUME Automatic (device needed) runtime resume was
* requested by a driver.
*/

#define PM_EVENT_ON 0x0000
Expand All @@ -256,9 +271,18 @@ struct pm_ext_ops {
#define PM_EVENT_THAW 0x0020
#define PM_EVENT_RESTORE 0x0040
#define PM_EVENT_RECOVER 0x0080
#define PM_EVENT_USER 0x0100
#define PM_EVENT_REMOTE 0x0200
#define PM_EVENT_AUTO 0x0400

#define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE)
#define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE)
#define PM_EVENT_USER_SUSPEND (PM_EVENT_USER | PM_EVENT_SUSPEND)
#define PM_EVENT_USER_RESUME (PM_EVENT_USER | PM_EVENT_RESUME)
#define PM_EVENT_REMOTE_WAKEUP (PM_EVENT_REMOTE | PM_EVENT_RESUME)
#define PM_EVENT_AUTO_SUSPEND (PM_EVENT_AUTO | PM_EVENT_SUSPEND)
#define PM_EVENT_AUTO_RESUME (PM_EVENT_AUTO | PM_EVENT_RESUME)

#define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, })
#define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, })
#define PMSG_QUIESCE ((struct pm_message){ .event = PM_EVENT_QUIESCE, })
#define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, })
Expand All @@ -267,7 +291,16 @@ struct pm_ext_ops {
#define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, })
#define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, })
#define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, })
#define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, })
#define PMSG_USER_SUSPEND ((struct pm_messge) \
{ .event = PM_EVENT_USER_SUSPEND, })
#define PMSG_USER_RESUME ((struct pm_messge) \
{ .event = PM_EVENT_USER_RESUME, })
#define PMSG_REMOTE_RESUME ((struct pm_messge) \
{ .event = PM_EVENT_REMOTE_RESUME, })
#define PMSG_AUTO_SUSPEND ((struct pm_messge) \
{ .event = PM_EVENT_AUTO_SUSPEND, })
#define PMSG_AUTO_RESUME ((struct pm_messge) \
{ .event = PM_EVENT_AUTO_RESUME, })

/**
* Device power management states
Expand Down

0 comments on commit b61c3af

Please sign in to comment.