summaryrefslogtreecommitdiff
path: root/drivers/pmdomain/core.h
AgeCommit message (Collapse)Author
2026-09-28pmdomain: core: add genpd_for_each_child() helperKevin Hilman (TI)
Add a new internal helper function genpd_for_each_child() that recursively iterates over all devices in a PM domain and its child domains (subdomains). This helper is useful for governors and other core PM domain code that needs to examine or apply operations to all devices within a domain hierarchy. The function takes a callback that is invoked for each device, and supports early termination if the callback returns a non-zero value. The helper is defined in a new internal header drivers/pmdomain/core.h and implemented in drivers/pmdomain/core.c, making it available to other PM domain subsystem components. The first user of this helper is the cpu_system_power_down_ok() governor function, which uses it to check device QoS latency constraints across the entire domain hierarchy. Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Signed-off-by: Kevin Hilman (TI) <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>