include/linux/pm_domain.h
Source file repositories/reference/linux-study-clean/include/linux/pm_domain.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/pm_domain.h- Extension
.h- Size
- 19132 bytes
- Lines
- 619
- 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/ktime.hlinux/mutex.hlinux/pm.hlinux/err.hlinux/of.hlinux/notifier.hlinux/spinlock.hlinux/cpumask_types.hlinux/time64.h
Detected Declarations
struct dev_pm_domain_attach_datastruct dev_pm_domain_liststruct dev_power_governorstruct gpd_dev_opsstruct genpd_governor_datastruct genpd_power_statestruct genpd_lock_opsstruct opp_tablestruct generic_pm_domainstruct gpd_linkstruct gpd_timing_datastruct pm_domain_datastruct generic_pm_domain_datastruct of_device_idstruct genpd_onecell_dataenum gpd_statusenum genpd_noticationenum genpd_sync_statefunction pm_genpd_add_devicefunction pm_genpd_remove_devicefunction pm_genpd_add_subdomainfunction pm_genpd_remove_subdomainfunction pm_genpd_initfunction pm_genpd_removefunction pm_genpd_inc_rejectedfunction dev_pm_genpd_set_performance_statefunction dev_pm_genpd_add_notifierfunction dev_pm_genpd_remove_notifierfunction dev_pm_genpd_set_next_wakeupfunction dev_pm_genpd_synced_powerofffunction dev_pm_genpd_get_hwmodefunction dev_pm_genpd_rpm_always_onfunction dev_pm_genpd_is_onfunction dev_pm_genpd_suspendfunction of_genpd_add_provider_simplefunction of_genpd_add_provider_onecellfunction of_genpd_del_providerfunction of_genpd_add_subdomainfunction of_genpd_remove_subdomainfunction of_genpd_parse_idle_statesfunction of_genpd_sync_statefunction of_genpd_add_child_idsfunction of_genpd_remove_child_idsfunction dev_pm_domain_attachfunction dev_pm_domain_attach_listfunction devm_pm_domain_attach_listfunction dev_pm_domain_detachfunction dev_pm_domain_set
Annotated Snippet
struct dev_pm_domain_attach_data {
const char * const *pd_names;
u32 num_pd_names;
u32 pd_flags;
};
struct dev_pm_domain_list {
struct device **pd_devs;
struct device_link **pd_links;
u32 *opp_tokens;
u32 num_pds;
};
/*
* Flags to control the behaviour of a genpd.
*
* These flags may be set in the struct generic_pm_domain's flags field by a
* genpd backend driver. The flags must be set before it calls pm_genpd_init(),
* which initializes a genpd.
*
* GENPD_FLAG_PM_CLK: Instructs genpd to use the PM clk framework,
* while powering on/off attached devices.
*
* GENPD_FLAG_IRQ_SAFE: This informs genpd that its backend callbacks,
* ->power_on|off(), doesn't sleep. Hence, these
* can be invoked from within atomic context, which
* enables genpd to power on/off the PM domain,
* even when pm_runtime_is_irq_safe() returns true,
* for any of its attached devices. Note that, a
* genpd having this flag set, requires its
* masterdomains to also have it set.
*
* GENPD_FLAG_ALWAYS_ON: Instructs genpd to always keep the PM domain
* powered on.
*
* GENPD_FLAG_ACTIVE_WAKEUP: Instructs genpd to keep the PM domain powered
* on, in case any of its attached devices is used
* in the wakeup path to serve system wakeups.
*
* GENPD_FLAG_CPU_DOMAIN: Instructs genpd that it should expect to get
* devices attached, which may belong to CPUs or
* possibly have subdomains with CPUs attached.
* This flag enables the genpd backend driver to
* deploy idle power management support for CPUs
* and groups of CPUs. Note that, the backend
* driver must then comply with the so called,
* last-man-standing algorithm, for the CPUs in the
* PM domain.
*
* GENPD_FLAG_RPM_ALWAYS_ON: Instructs genpd to always keep the PM domain
* powered on except for system suspend.
*
* GENPD_FLAG_MIN_RESIDENCY: Enable the genpd governor to consider its
* components' next wakeup when determining the
* optimal idle state.
*
* GENPD_FLAG_OPP_TABLE_FW: The genpd provider supports performance states,
* but its corresponding OPP tables are not
* described in DT, but are given directly by FW.
*
* GENPD_FLAG_DEV_NAME_FW: Instructs genpd to generate an unique device name
* using ida. It is used by genpd providers which
* get their genpd-names directly from FW.
*
* GENPD_FLAG_NO_SYNC_STATE: The ->sync_state() support is implemented in a
* genpd provider specific way, likely through a
* parent device node. This flag makes genpd to
* skip its internal support for this.
*
* GENPD_FLAG_NO_STAY_ON: For genpd OF providers a powered-on PM domain at
* initialization is prevented from being
* powered-off until the ->sync_state() callback is
* invoked. This flag informs genpd to allow a
* power-off without waiting for ->sync_state().
*/
#define GENPD_FLAG_PM_CLK (1U << 0)
#define GENPD_FLAG_IRQ_SAFE (1U << 1)
#define GENPD_FLAG_ALWAYS_ON (1U << 2)
#define GENPD_FLAG_ACTIVE_WAKEUP (1U << 3)
#define GENPD_FLAG_CPU_DOMAIN (1U << 4)
#define GENPD_FLAG_RPM_ALWAYS_ON (1U << 5)
#define GENPD_FLAG_MIN_RESIDENCY (1U << 6)
#define GENPD_FLAG_OPP_TABLE_FW (1U << 7)
#define GENPD_FLAG_DEV_NAME_FW (1U << 8)
#define GENPD_FLAG_NO_SYNC_STATE (1U << 9)
#define GENPD_FLAG_NO_STAY_ON (1U << 10)
enum gpd_status {
GENPD_STATE_ON = 0, /* PM domain is on */
GENPD_STATE_OFF, /* PM domain is off */
Annotation
- Immediate include surface: `linux/device.h`, `linux/ktime.h`, `linux/mutex.h`, `linux/pm.h`, `linux/err.h`, `linux/of.h`, `linux/notifier.h`, `linux/spinlock.h`.
- Detected declarations: `struct dev_pm_domain_attach_data`, `struct dev_pm_domain_list`, `struct dev_power_governor`, `struct gpd_dev_ops`, `struct genpd_governor_data`, `struct genpd_power_state`, `struct genpd_lock_ops`, `struct opp_table`, `struct generic_pm_domain`, `struct gpd_link`.
- 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.