• Axel Haslam's avatar
    PM / Domains: Support for multiple states · fc5cbf0c
    Axel Haslam authored
    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: default avatarKevin Hilman <khilman@linaro.org>
    Signed-off-by: default avatarLina Iyer <lina.iyer@linaro.org>
    Signed-off-by: default avatarAxel Haslam <ahaslam+renesas@baylibre.com>
    Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    fc5cbf0c
pm_domain.h 7.84 KB