Skip to content

Commit f721889

Browse files
committed
PM / Domains: Support for generic I/O PM domains (v8)
Introduce common headers, helper functions and callbacks allowing platforms to use simple generic power domains for runtime power management. Introduce struct generic_pm_domain to be used for representing power domains that each contain a number of devices and may be parent domains or subdomains with respect to other power domains. Among other things, this structure includes callbacks to be provided by platforms for performing specific tasks related to power management (i.e. ->stop_device() may disable a device's clocks, while ->start_device() may enable them, ->power_off() is supposed to remove power from the entire power domain and ->power_on() is supposed to restore it). Introduce functions that can be used as power domain runtime PM callbacks, pm_genpd_runtime_suspend() and pm_genpd_runtime_resume(), as well as helper functions for the initialization of a power domain represented by a struct generic_power_domain object, adding a device to or removing a device from it and adding or removing subdomains. Introduce configuration option CONFIG_PM_GENERIC_DOMAINS to be selected by the platforms that want to use the new code. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Kevin Hilman <[email protected]>
1 parent dc6e4e5 commit f721889

File tree

4 files changed

+577
-0
lines changed

4 files changed

+577
-0
lines changed

drivers/base/power/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o
33
obj-$(CONFIG_PM_RUNTIME) += runtime.o
44
obj-$(CONFIG_PM_TRACE_RTC) += trace.o
55
obj-$(CONFIG_PM_OPP) += opp.o
6+
obj-$(CONFIG_PM_GENERIC_DOMAINS) += domain.o
67
obj-$(CONFIG_HAVE_CLK) += clock_ops.o
78

89
ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG

0 commit comments

Comments
 (0)