[PATCH v7 18/38] clk: scmi: port driver to the new scmi_clk_proto_ops interface

Stephen Boyd sboyd at kernel.org
Fri Mar 26 00:08:59 GMT 2021


Sorry didn't notice because linux-clk at vger.kernel.org wasn't Cced

Quoting Cristian Marussi (2021-03-16 05:48:43)
> Port driver to the new SCMI Clock interface based on protocol handles
> and common devm_get_ops().
> 
> Cc: Michael Turquette <mturquette at baylibre.com>
> Cc: Stephen Boyd <sboyd at kernel.org>
> Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
> ---
> v6 -> v7
> - fixed Copyright
> - renamed non-static function to fit scmi_<OBJ>_<ACTION> naming pattern
> v4 --> v5
> - using renamed devm_get/put_protocol
> ---
>  drivers/clk/clk-scmi.c | 27 +++++++++++++++++----------
>  1 file changed, 17 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c
> index c754dfbb73fd..be4c13d63385 100644
> --- a/drivers/clk/clk-scmi.c
> +++ b/drivers/clk/clk-scmi.c
> @@ -2,7 +2,7 @@
>  /*
>   * System Control and Power Interface (SCMI) Protocol based clock driver
>   *
> - * Copyright (C) 2018 ARM Ltd.
> + * Copyright (C) 2018-2021 ARM Ltd.
>   */
>  
>  #include <linux/clk-provider.h>
> @@ -13,11 +13,13 @@
>  #include <linux/scmi_protocol.h>
>  #include <asm/div64.h>
>  
> +static const struct scmi_clk_proto_ops *clk_ops;

Can you call it scmi_proto_clk_ops instead of clk_ops? We already have
'struct clk_ops' and this pollutes the global namespace with another
'clk_ops'.

> +
>  struct scmi_clk {
>         u32 id;
>         struct clk_hw hw;
>         const struct scmi_clock_info *info;
> -       const struct scmi_handle *handle;
> +       const struct scmi_protocol_handle *ph;
>  };
>  
>  #define to_scmi_clk(clk) container_of(clk, struct scmi_clk, hw)



More information about the linux-arm-kernel mailing list