diff options
author | Tero Kristo <t-kristo@ti.com> | 2019-01-15 11:15:13 +0200 |
---|---|---|
committer | Tero Kristo <t-kristo@ti.com> | 2019-02-15 16:46:21 +0200 |
commit | 7fd79ee78a0318bd23f92c3cf3f4aba03a5dd6ad (patch) | |
tree | cdefcb84f52a3d9a98e823421b4348e2897bf43d /drivers/clk/ti/clk.c | |
parent | 77b773aea5a8abccbd25101390e1ba4b33b3fca0 (diff) | |
download | linux-7fd79ee78a0318bd23f92c3cf3f4aba03a5dd6ad.tar.bz2 |
clk: ti: add new API for checking if a provided clock is an OMAP clock
omap2_clk_is_hw_omap can now be used to verify if the provided clk_hw
is an omap HW clock or not. This is done to replace the usage of CLK_IS_BASIC
flag within the TI clock drivers.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Diffstat (limited to 'drivers/clk/ti/clk.c')
-rw-r--r-- | drivers/clk/ti/clk.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c index 817284324d41..122af2680833 100644 --- a/drivers/clk/ti/clk.c +++ b/drivers/clk/ti/clk.c @@ -559,3 +559,22 @@ int omap2_clk_for_each(int (*fn)(struct clk_hw_omap *hw)) return ret; } + +/** + * omap2_clk_is_hw_omap - check if the provided clk_hw is OMAP clock + * @hw: clk_hw to check if it is an omap clock or not + * + * Checks if the provided clk_hw is OMAP clock or not. Returns true if + * it is, false otherwise. + */ +bool omap2_clk_is_hw_omap(struct clk_hw *hw) +{ + struct clk_hw_omap *oclk; + + list_for_each_entry(oclk, &clk_hw_omap_clocks, node) { + if (&oclk->hw == hw) + return true; + } + + return false; +} |