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