]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PM: domains: Introduce dev_pm_domain_set_performance_state()
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Sep 2023 13:17:07 +0000 (15:17 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 6 Oct 2023 07:07:33 +0000 (12:37 +0530)
commit3fbc5c3b8522d655cf91d32c158261060fdc02fe
treec3b6ec0a7ed2cc0e80c716e2c962776932508b90
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
PM: domains: Introduce dev_pm_domain_set_performance_state()

The generic PM domain is currently the only PM domain variant that supports
performance scaling. To allow performance scaling to be supported through a
common interface, let's add an optional callback ->set_performance_state(),
in the struct dev_pm_domain.

Moreover, let's add a function, dev_pm_domain_set_performance_state(), that
may be called by consumers to request a new performance state for a device
through its PM domain.

Note that, in most cases it's preferred that a consumer use the OPP library
to request a new performance state for its device. Although, this requires
some additional changes to be supported, which are being implemented from
subsequent changes.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/base/power/common.c
include/linux/pm.h
include/linux/pm_domain.h