diff options
author | Russ Dill <Russ.Dill@ti.com> | 2018-09-04 12:19:35 +0530 |
---|---|---|
committer | Tero Kristo <t-kristo@ti.com> | 2018-10-03 15:29:04 +0300 |
commit | 8b95d1ce3300c411728954473316bd04d0ba9883 (patch) | |
tree | 1d7260045ce7f4563f479d7b3bd1f5680b6a992f /include/linux/clk-provider.h | |
parent | dffa9051d54672a7d7f5951e074c4393672c03e9 (diff) | |
download | linux-8b95d1ce3300c411728954473316bd04d0ba9883.tar.gz linux-8b95d1ce3300c411728954473316bd04d0ba9883.tar.bz2 linux-8b95d1ce3300c411728954473316bd04d0ba9883.zip |
clk: Add functions to save/restore clock context en-masse
Deep enough power saving mode can result into losing context of the clock
registers also, and they need to be restored once coming back from the power
saving mode. Hence add functions to save/restore clock context.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r-- | include/linux/clk-provider.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 08b1aa70a38d..df7379da6269 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -119,6 +119,11 @@ struct clk_duty { * Called with enable_lock held. This function must not * sleep. * + * @save_context: Save the context of the clock in prepration for poweroff. + * + * @restore_context: Restore the context of the clock after a restoration + * of power. + * * @recalc_rate Recalculate the rate of this clock, by querying hardware. The * parent rate is an input parameter. It is up to the caller to * ensure that the prepare_mutex is held across this call. @@ -223,6 +228,8 @@ struct clk_ops { void (*disable)(struct clk_hw *hw); int (*is_enabled)(struct clk_hw *hw); void (*disable_unused)(struct clk_hw *hw); + int (*save_context)(struct clk_hw *hw); + void (*restore_context)(struct clk_hw *hw); unsigned long (*recalc_rate)(struct clk_hw *hw, unsigned long parent_rate); long (*round_rate)(struct clk_hw *hw, unsigned long rate, |