]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/hwspinlock.git/blobdiff - include/linux/clk-provider.h
clk: clk: Add functions to save/restore clock context en-masse
[rpmsg/hwspinlock.git] / include / linux / clk-provider.h
index 08b1aa70a38d30a30cb4ae0f58bf7a68be92b15b..df7379da62695ec44d75ffe428a09d11604b1bcb 100644 (file)
@@ -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,