Message ID | 20180709183009.19206-6-jagan@amarulasolutions.com |
---|---|
State | RFC |
Delegated to: | Stefano Babic |
Headers | show |
Series | i.MX: Add initial CLK support | expand |
On 9 July 2018 at 12:30, Jagan Teki <jagan@amarulasolutions.com> wrote: > Add clock validate function for validating > specific clock to do further clock operations. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > include/clk-uclass.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/include/clk-uclass.h b/include/clk-uclass.h index e76d98e2f6..452eed008e 100644 --- a/include/clk-uclass.h +++ b/include/clk-uclass.h @@ -100,4 +100,14 @@ struct clk_ops { int (*disable)(struct clk *clk); }; +/** + * generic_clk_valid() - check if clk port is valid + * + * @clk: the clk port to check + * @return TRUE if valid, or FALSE + */ +static inline bool generic_clk_valid(struct clk *clk) +{ + return clk->dev != NULL; +} #endif
Add clock validate function for validating specific clock to do further clock operations. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- include/clk-uclass.h | 10 ++++++++++ 1 file changed, 10 insertions(+)