Add clock validate function for validating specific clock to do further clock operations.
Signed-off-by: Jagan Teki <[email protected]> --- include/clk-uclass.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.17.1 _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

