diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pm.h | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index ed98d967f9fb..4dcce54b6d76 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -245,6 +245,21 @@ struct pm_ext_ops { | |||
245 | * RECOVER Creation of a hibernation image or restoration of the main | 245 | * RECOVER Creation of a hibernation image or restoration of the main |
246 | * memory contents from a hibernation image has failed, call | 246 | * memory contents from a hibernation image has failed, call |
247 | * ->thaw() and ->complete() for all devices. | 247 | * ->thaw() and ->complete() for all devices. |
248 | * | ||
249 | * The following PM_EVENT_ messages are defined for internal use by | ||
250 | * kernel subsystems. They are never issued by the PM core. | ||
251 | * | ||
252 | * USER_SUSPEND Manual selective suspend was issued by userspace. | ||
253 | * | ||
254 | * USER_RESUME Manual selective resume was issued by userspace. | ||
255 | * | ||
256 | * REMOTE_WAKEUP Remote-wakeup request was received from the device. | ||
257 | * | ||
258 | * AUTO_SUSPEND Automatic (device idle) runtime suspend was | ||
259 | * initiated by the subsystem. | ||
260 | * | ||
261 | * AUTO_RESUME Automatic (device needed) runtime resume was | ||
262 | * requested by a driver. | ||
248 | */ | 263 | */ |
249 | 264 | ||
250 | #define PM_EVENT_ON 0x0000 | 265 | #define PM_EVENT_ON 0x0000 |
@@ -256,9 +271,18 @@ struct pm_ext_ops { | |||
256 | #define PM_EVENT_THAW 0x0020 | 271 | #define PM_EVENT_THAW 0x0020 |
257 | #define PM_EVENT_RESTORE 0x0040 | 272 | #define PM_EVENT_RESTORE 0x0040 |
258 | #define PM_EVENT_RECOVER 0x0080 | 273 | #define PM_EVENT_RECOVER 0x0080 |
274 | #define PM_EVENT_USER 0x0100 | ||
275 | #define PM_EVENT_REMOTE 0x0200 | ||
276 | #define PM_EVENT_AUTO 0x0400 | ||
259 | 277 | ||
260 | #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE) | 278 | #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE) |
279 | #define PM_EVENT_USER_SUSPEND (PM_EVENT_USER | PM_EVENT_SUSPEND) | ||
280 | #define PM_EVENT_USER_RESUME (PM_EVENT_USER | PM_EVENT_RESUME) | ||
281 | #define PM_EVENT_REMOTE_WAKEUP (PM_EVENT_REMOTE | PM_EVENT_RESUME) | ||
282 | #define PM_EVENT_AUTO_SUSPEND (PM_EVENT_AUTO | PM_EVENT_SUSPEND) | ||
283 | #define PM_EVENT_AUTO_RESUME (PM_EVENT_AUTO | PM_EVENT_RESUME) | ||
261 | 284 | ||
285 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | ||
262 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) | 286 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) |
263 | #define PMSG_QUIESCE ((struct pm_message){ .event = PM_EVENT_QUIESCE, }) | 287 | #define PMSG_QUIESCE ((struct pm_message){ .event = PM_EVENT_QUIESCE, }) |
264 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) | 288 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) |
@@ -267,7 +291,16 @@ struct pm_ext_ops { | |||
267 | #define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, }) | 291 | #define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, }) |
268 | #define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, }) | 292 | #define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, }) |
269 | #define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, }) | 293 | #define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, }) |
270 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | 294 | #define PMSG_USER_SUSPEND ((struct pm_messge) \ |
295 | { .event = PM_EVENT_USER_SUSPEND, }) | ||
296 | #define PMSG_USER_RESUME ((struct pm_messge) \ | ||
297 | { .event = PM_EVENT_USER_RESUME, }) | ||
298 | #define PMSG_REMOTE_RESUME ((struct pm_messge) \ | ||
299 | { .event = PM_EVENT_REMOTE_RESUME, }) | ||
300 | #define PMSG_AUTO_SUSPEND ((struct pm_messge) \ | ||
301 | { .event = PM_EVENT_AUTO_SUSPEND, }) | ||
302 | #define PMSG_AUTO_RESUME ((struct pm_messge) \ | ||
303 | { .event = PM_EVENT_AUTO_RESUME, }) | ||
271 | 304 | ||
272 | /** | 305 | /** |
273 | * Device power management states | 306 | * Device power management states |