mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
clk: add clk_valid()
Add clk_valid() to check for optional clocks are valid. Call clk_valid() in test/dm/clk.c and add relevant test routine to sandbox clk tests. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Tom Rini
parent
14aa210c1d
commit
1fe243a1e4
@@ -294,4 +294,14 @@ int clk_disable_bulk(struct clk_bulk *bulk);
|
||||
|
||||
int soc_clk_dump(void);
|
||||
|
||||
/**
|
||||
* clk_valid() - check if clk is valid
|
||||
*
|
||||
* @clk: the clock to check
|
||||
* @return true if valid, or false
|
||||
*/
|
||||
static inline bool clk_valid(struct clk *clk)
|
||||
{
|
||||
return !!clk->dev;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user