diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-03-11 17:07:37 -0700 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-03-12 12:20:36 -0700 |
commit | 5cf065f556cb5926127b52563f494c2dd0a878e4 (patch) | |
tree | 8bd8b39baaa0df2e5c8ce3c66ef4c2433b6130e1 /include | |
parent | 306c342f9cb1f573af57a6afd1b3549aa97b9281 (diff) | |
parent | aaa6d06282a749d0df8e5e22e73f8a3372f96853 (diff) |
Merge branch 'clk-fixes' into clk-next
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clk.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index 8381bbfbc308..68c16a6bedb3 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -125,6 +125,19 @@ int clk_set_phase(struct clk *clk, int degrees); */ int clk_get_phase(struct clk *clk); +/** + * clk_is_match - check if two clk's point to the same hardware clock + * @p: clk compared against q + * @q: clk compared against p + * + * Returns true if the two struct clk pointers both point to the same hardware + * clock node. Put differently, returns true if struct clk *p and struct clk *q + * share the same struct clk_core object. + * + * Returns false otherwise. Note that two NULL clks are treated as matching. + */ +bool clk_is_match(const struct clk *p, const struct clk *q); + #else static inline long clk_get_accuracy(struct clk *clk) @@ -142,6 +155,11 @@ static inline long clk_get_phase(struct clk *clk) return -ENOTSUPP; } +static inline bool clk_is_match(const struct clk *p, const struct clk *q) +{ + return p == q; +} + #endif /** |