include/linux/pm_runtime.h
Source file repositories/reference/linux-study-clean/include/linux/pm_runtime.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/pm_runtime.h- Extension
.h- Size
- 29030 bytes
- Lines
- 824
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/notifier.hlinux/pm.hlinux/jiffies.h
Detected Declarations
function queue_pm_workfunction pm_suspend_ignore_childrenfunction pm_runtime_get_noresumefunction pm_runtime_put_noidlefunction pm_runtime_suspendedfunction pm_runtime_activefunction pm_runtime_status_suspendedfunction pm_runtime_enabledfunction pm_runtime_blockedfunction pm_runtime_has_no_callbacksfunction ktime_get_mono_fast_nsfunction pm_runtime_is_irq_safefunction queue_pm_workfunction pm_generic_runtime_suspendfunction pm_generic_runtime_resumefunction pm_runtime_force_suspendfunction __pm_runtime_idlefunction __pm_runtime_suspendfunction __pm_runtime_resumefunction pm_schedule_suspendfunction pm_runtime_get_if_in_usefunction pm_runtime_get_if_activefunction __pm_runtime_set_statusfunction pm_runtime_barrierfunction pm_runtime_unblockfunction pm_runtime_allowfunction devm_pm_runtime_enablefunction devm_pm_runtime_get_noresumefunction pm_suspend_ignore_childrenfunction pm_runtime_activefunction pm_runtime_status_suspendedfunction pm_runtime_enabledfunction pm_runtime_no_callbacksfunction pm_runtime_has_no_callbacksfunction pm_runtime_mark_last_busyfunction pm_runtime_set_memalloc_noiofunction pm_runtime_need_not_resumefunction pm_runtime_force_resumefunction pm_runtime_idlefunction pm_runtime_suspendfunction pm_runtime_autosuspendfunction pm_runtime_resumefunction pm_runtime_idlefunction pm_request_resumefunction pm_request_autosuspendfunction pm_runtime_getfunction pm_runtime_resumefunction pm_runtime_get_active
Annotated Snippet
static inline bool queue_pm_work(struct work_struct *work) { return false; }
static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
static inline int pm_generic_runtime_resume(struct device *dev) { return 0; }
static inline int pm_runtime_force_suspend(struct device *dev) { return 0; }
static inline int __pm_runtime_idle(struct device *dev, int rpmflags)
{
return -ENOSYS;
}
static inline int __pm_runtime_suspend(struct device *dev, int rpmflags)
{
return -ENOSYS;
}
static inline int __pm_runtime_resume(struct device *dev, int rpmflags)
{
return 1;
}
static inline int pm_schedule_suspend(struct device *dev, unsigned int delay)
{
return -ENOSYS;
}
static inline int pm_runtime_get_if_in_use(struct device *dev)
{
return -EINVAL;
}
static inline int pm_runtime_get_if_active(struct device *dev)
{
return -EINVAL;
}
static inline int __pm_runtime_set_status(struct device *dev,
unsigned int status) { return 0; }
static inline void pm_runtime_barrier(struct device *dev) {}
static inline bool pm_runtime_block_if_disabled(struct device *dev) { return true; }
static inline void pm_runtime_unblock(struct device *dev) {}
static inline void pm_runtime_enable(struct device *dev) {}
static inline void __pm_runtime_disable(struct device *dev, bool c) {}
static inline bool pm_runtime_blocked(struct device *dev) { return true; }
static inline void pm_runtime_allow(struct device *dev) {}
static inline void pm_runtime_forbid(struct device *dev) {}
static inline int devm_pm_runtime_set_active_enabled(struct device *dev) { return 0; }
static inline int devm_pm_runtime_enable(struct device *dev) { return 0; }
static inline int devm_pm_runtime_get_noresume(struct device *dev) { return 0; }
static inline void pm_suspend_ignore_children(struct device *dev, bool enable) {}
static inline void pm_runtime_get_noresume(struct device *dev) {}
static inline void pm_runtime_put_noidle(struct device *dev) {}
static inline bool pm_runtime_suspended(struct device *dev) { return false; }
static inline bool pm_runtime_active(struct device *dev) { return true; }
static inline bool pm_runtime_status_suspended(struct device *dev) { return false; }
static inline bool pm_runtime_enabled(struct device *dev) { return false; }
static inline void pm_runtime_no_callbacks(struct device *dev) {}
static inline void pm_runtime_irq_safe(struct device *dev) {}
static inline bool pm_runtime_is_irq_safe(struct device *dev) { return false; }
static inline bool pm_runtime_has_no_callbacks(struct device *dev) { return false; }
static inline void pm_runtime_mark_last_busy(struct device *dev) {}
static inline void __pm_runtime_use_autosuspend(struct device *dev,
bool use) {}
static inline void pm_runtime_set_autosuspend_delay(struct device *dev,
int delay) {}
static inline u64 pm_runtime_autosuspend_expiration(
struct device *dev) { return 0; }
static inline void pm_runtime_set_memalloc_noio(struct device *dev,
bool enable){}
static inline void pm_runtime_get_suppliers(struct device *dev) {}
static inline void pm_runtime_put_suppliers(struct device *dev) {}
static inline void pm_runtime_new_link(struct device *dev) {}
static inline void pm_runtime_drop_link(struct device_link *link) {}
static inline void pm_runtime_release_supplier(struct device_link *link) {}
#endif /* !CONFIG_PM */
#ifdef CONFIG_PM_SLEEP
bool pm_runtime_need_not_resume(struct device *dev);
int pm_runtime_force_resume(struct device *dev);
#else /* !CONFIG_PM_SLEEP */
static inline bool pm_runtime_need_not_resume(struct device *dev) {return true; }
static inline int pm_runtime_force_resume(struct device *dev) { return -ENXIO; }
#endif /* CONFIG_PM_SLEEP */
/**
* pm_runtime_idle - Conditionally set up autosuspend of a device or suspend it.
* @dev: Target device.
Annotation
- Immediate include surface: `linux/device.h`, `linux/notifier.h`, `linux/pm.h`, `linux/jiffies.h`.
- Detected declarations: `function queue_pm_work`, `function pm_suspend_ignore_children`, `function pm_runtime_get_noresume`, `function pm_runtime_put_noidle`, `function pm_runtime_suspended`, `function pm_runtime_active`, `function pm_runtime_status_suspended`, `function pm_runtime_enabled`, `function pm_runtime_blocked`, `function pm_runtime_has_no_callbacks`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.