Commit be68bf88 authored by Joachim Eastwood's avatar Joachim Eastwood Committed by Stephen Boyd

clk: Add clk_hw_is_enabled() for use by clk providers

Add clk_hw_is_enabled() to the provider APIs so clk providers can
use a struct clk_hw instead of a struct clk to check if a clk is
enabled or not.
Signed-off-by: default avatarJoachim Eastwood <manabian@gmail.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 679c51cf
...@@ -427,6 +427,11 @@ bool clk_hw_is_prepared(const struct clk_hw *hw) ...@@ -427,6 +427,11 @@ bool clk_hw_is_prepared(const struct clk_hw *hw)
return clk_core_is_prepared(hw->core); return clk_core_is_prepared(hw->core);
} }
bool clk_hw_is_enabled(const struct clk_hw *hw)
{
return clk_core_is_enabled(hw->core);
}
bool __clk_is_enabled(struct clk *clk) bool __clk_is_enabled(struct clk *clk)
{ {
if (!clk) if (!clk)
......
...@@ -654,6 +654,7 @@ unsigned long clk_hw_get_rate(const struct clk_hw *hw); ...@@ -654,6 +654,7 @@ unsigned long clk_hw_get_rate(const struct clk_hw *hw);
unsigned long __clk_get_flags(struct clk *clk); unsigned long __clk_get_flags(struct clk *clk);
unsigned long clk_hw_get_flags(const struct clk_hw *hw); unsigned long clk_hw_get_flags(const struct clk_hw *hw);
bool clk_hw_is_prepared(const struct clk_hw *hw); bool clk_hw_is_prepared(const struct clk_hw *hw);
bool clk_hw_is_enabled(const struct clk_hw *hw);
bool __clk_is_enabled(struct clk *clk); bool __clk_is_enabled(struct clk *clk);
struct clk *__clk_lookup(const char *name); struct clk *__clk_lookup(const char *name);
int __clk_mux_determine_rate(struct clk_hw *hw, int __clk_mux_determine_rate(struct clk_hw *hw,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment