diff options
| author | Taniya Das <tdas@codeaurora.org> | 2016-06-15 12:15:01 +0530 |
|---|---|---|
| committer | Taniya Das <tdas@codeaurora.org> | 2016-07-14 16:57:22 +0530 |
| commit | 72d71311e26c38a8629ee47b36ef0299967284eb (patch) | |
| tree | b4d2f4f52a7551961b746cfb9716a89845eb770c /include | |
| parent | aa958278d16faccd0cc79650b94ea6aa18d4131d (diff) | |
clk: Add support to set custom flags with clk_set_flags
The new API clk_set_flags could be used by hardware specific clock drivers
or clients for specific hardware requirements. These flags could be custom
defined as per hardware needs.
Change-Id: Ia67373ee2b8934c898052c68338fa86cb16070dd
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/clk-provider.h | 3 | ||||
| -rw-r--r-- | include/linux/clk.h | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 03b9f6fab0ff..23026ba6ff25 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -173,6 +173,8 @@ struct clk_rate_request { * directory is provided as an argument. Called with * prepare_lock held. Returns 0 on success, -EERROR otherwise. * + * @set_flags: Set custom flags which deals with hardware specifics. Returns 0 + * on success, -EEROR otherwise. * * The clk_enable/clk_disable and clk_prepare/clk_unprepare pairs allow * implementations to split any work between atomic (enable) and sleepable @@ -213,6 +215,7 @@ struct clk_ops { int (*set_phase)(struct clk_hw *hw, int degrees); void (*init)(struct clk_hw *hw); int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); + int (*set_flags)(struct clk_hw *hw, unsigned flags); }; /** diff --git a/include/linux/clk.h b/include/linux/clk.h index c06bbd5ce952..76708a7c46c0 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -408,6 +408,16 @@ struct clk *clk_get_parent(struct clk *clk); */ struct clk *clk_get_sys(const char *dev_id, const char *con_id); +/** + * clk_set_flags - set the custom specific flags for this clock + * @clk: clock source + * @flags: custom flags which would be hardware specific, defined for specific + * hardware. + * + * Returns success 0 or negative errno. + */ +int clk_set_flags(struct clk *clk, unsigned long flags); + #else /* !CONFIG_HAVE_CLK */ static inline struct clk *clk_get(struct device *dev, const char *id) |
