]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/base/power/domain.c
PM / Domains: Support for multiple states
authorAxel Haslam <ahaslam+renesas@baylibre.com>
Mon, 15 Feb 2016 10:10:51 +0000 (11:10 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Feb 2016 22:18:15 +0000 (23:18 +0100)
commitfc5cbf0c94b6f7fd62fdddff892207290510945d
tree9ef04949dffbc2b8bdb545f1f998041910419628
parent18558cae0272f8fd9647e69d3fec1565a7949865
PM / Domains: Support for multiple states

Some hardware (eg. OMAP), has the ability to enter different low power
modes for a given power domain. This allows for more fine grained control
over the power state of the platform. As a typical example, some registers
of the hardware may be implemented with retention flip-flops and be able
to retain their state at lower voltages allowing for faster on/off
latencies and an increased window of opportunity to enter an intermediate
low power state other than "off"

When trying to set a power domain to off, the genpd governor will choose
the deepest state that will respect the qos constraints of all the devices
and sub-domains on the power domain. The state chosen by the governor is
saved in the "state_idx" field of the generic_pm_domain structure and
shall be used by the power_off and power_on callbacks to perform the
necessary actions to set the power domain into (and out of) the state
indicated by state_idx.

States must be declared in ascending order from shallowest to deepest,
deepest meaning the state which takes longer to enter and exit.

For platforms that don't declare any states, a single a single "off"
state is used. Once all platforms are converted to use the state array,
the legacy on/off latencies will be removed.

[ Lina: Modified genpd state initialization and remove use of
        save_state_latency_ns in genpd timing data ]
Suggested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Axel Haslam <ahaslam+renesas@baylibre.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c
drivers/base/power/domain_governor.c
include/linux/pm_domain.h