Changeset 679 for GPL/trunk/include/linux/pm.h
- Timestamp:
- Mar 18, 2021, 8:57:36 PM (4 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-linux-3.2.102 (added) merged: 611-614 /GPL/branches/uniaud32-next (added) merged: 615-678
- Property svn:mergeinfo changed
-
GPL/trunk/include/linux/pm.h
r441 r679 22 22 #define _LINUX_PM_H 23 23 24 #ifdef __KERNEL__25 26 #include <linux/config.h>27 24 #include <linux/list.h> 28 25 #include <asm/atomic.h> 26 #include <linux/workqueue.h> 27 28 enum rpm_status { 29 RPM_ACTIVE = 0, 30 RPM_RESUMING, 31 RPM_SUSPENDED, 32 RPM_SUSPENDING, 33 }; 29 34 30 35 /* … … 230 235 231 236 struct dev_pm_info { 232 #ifdef CONFIG_PM 237 unsigned int async_suspend:1; 238 bool is_prepared:1; /* Owned by the PM core */ 233 239 u32 power_state; 234 240 u8 * saved_state; … … 236 242 struct device * pm_parent; 237 243 struct list_head entry; 238 #endif239 244 }; 240 245 … … 247 252 248 253 249 #endif /* __KERNEL__ */ 250 251 typedef u32 __bitwise pm_message_t; 254 typedef struct pm_message { 255 int event; 256 } pm_message_t; 257 252 258 #define PMSG_FREEZE 3 253 259 #define PMSG_SUSPEND 3 254 260 #define PMSG_ON 0 261 #define PMSG_RESUME 0 262 #define PMSG_THAW 0 263 #define PMSG_RESTORE 0 264 265 266 struct dev_pm_ops { 267 int (*prepare)(struct device *dev); 268 void (*complete)(struct device *dev); 269 int (*suspend)(struct device *dev); 270 int (*resume)(struct device *dev); 271 int (*freeze)(struct device *dev); 272 int (*thaw)(struct device *dev); 273 int (*poweroff)(struct device *dev); 274 int (*restore)(struct device *dev); 275 int (*suspend_late)(struct device *dev); 276 int (*resume_early)(struct device *dev); 277 int (*freeze_late)(struct device *dev); 278 int (*thaw_early)(struct device *dev); 279 int (*poweroff_late)(struct device *dev); 280 int (*restore_early)(struct device *dev); 281 int (*suspend_noirq)(struct device *dev); 282 int (*resume_noirq)(struct device *dev); 283 int (*freeze_noirq)(struct device *dev); 284 int (*thaw_noirq)(struct device *dev); 285 int (*poweroff_noirq)(struct device *dev); 286 int (*restore_noirq)(struct device *dev); 287 int (*runtime_suspend)(struct device *dev); 288 int (*runtime_resume)(struct device *dev); 289 int (*runtime_idle)(struct device *dev); 290 }; 291 292 #define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ 293 .suspend = suspend_fn, \ 294 .resume = resume_fn, \ 295 .freeze = suspend_fn, \ 296 .thaw = resume_fn, \ 297 .poweroff = suspend_fn, \ 298 .restore = resume_fn, 299 300 /* 301 * Use this if you want to use the same suspend and resume callbacks for suspend 302 * to RAM and hibernation. 303 */ 304 #define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ 305 const struct dev_pm_ops name = { \ 306 SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ 307 } 308 309 #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ 310 .runtime_suspend = suspend_fn, \ 311 .runtime_resume = resume_fn, \ 312 .runtime_idle = idle_fn, 313 314 315 /* 316 * Power domains provide callbacks that are executed during system suspend, 317 * hibernation, system resume and during runtime PM transitions along with 318 * subsystem-level and driver-level callbacks. 319 */ 320 struct dev_pm_domain { 321 struct dev_pm_ops ops; 322 }; 323 324 #define PM_EVENT_RESTORE 0x0040 255 325 256 326 #endif /* _LINUX_PM_H */
Note:
See TracChangeset
for help on using the changeset viewer.