[U-Boot] [PATCH 1/6] clk: add clk_valid()

Simon Glass sjg at chromium.org
Mon Jul 23 23:48:01 UTC 2018


Hi Fabrice,

On 23 July 2018 at 06:35, Fabrice Gasnier <fabrice.gasnier at st.com> wrote:
>
> add clk_valid() to check for optional clocks are valid.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier at st.com>
> ---
>
>  include/clk.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/include/clk.h b/include/clk.h
> index 9a35764..71679a9 100644
> --- a/include/clk.h
> +++ b/include/clk.h
> @@ -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

true / false

> + */
> +static inline bool clk_valid(struct clk *clk)
> +{
> +       return !!clk->dev;
> +}
>  #endif
> --
> 1.9.1
>

Please can you add a call to this from test/dm/clk.c ?

Regards,
Simon


More information about the U-Boot mailing list