[PATCH 1/6] firmware: arm_scmi: Simplify enable/disable Clock operations

Stephen Boyd sboyd at kernel.org
Tue Aug 22 13:17:15 PDT 2023


Quoting Cristian Marussi (2023-08-11 09:14:41)
> Add a param to Clock enable/disable operation to ask for atomic operation
> and remove _atomic version of such operations.

Why?

> 
> No functional change.
> 
> CC: Michael Turquette <mturquette at baylibre.com>
> CC: Stephen Boyd <sboyd at kernel.org>
> CC: linux-clk at vger.kernel.org
> Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
> ---
>  drivers/clk/clk-scmi.c            |  8 ++++----
>  drivers/firmware/arm_scmi/clock.c | 24 ++++++------------------
>  include/linux/scmi_protocol.h     |  9 ++++-----
>  3 files changed, 14 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c
> index 2c7a830ce308..ff003083e592 100644
> --- a/drivers/clk/clk-scmi.c
> +++ b/drivers/clk/clk-scmi.c
> @@ -78,28 +78,28 @@ static int scmi_clk_enable(struct clk_hw *hw)
>  {
>         struct scmi_clk *clk = to_scmi_clk(hw);
>  
> -       return scmi_proto_clk_ops->enable(clk->ph, clk->id);
> +       return scmi_proto_clk_ops->enable(clk->ph, clk->id, false);
>  }
>  
>  static void scmi_clk_disable(struct clk_hw *hw)
>  {
>         struct scmi_clk *clk = to_scmi_clk(hw);
>  
> -       scmi_proto_clk_ops->disable(clk->ph, clk->id);
> +       scmi_proto_clk_ops->disable(clk->ph, clk->id, false);

I enjoyed how it was before because I don't know what 'false' means
without looking at the ops now.

>  }
>  
>  static int scmi_clk_atomic_enable(struct clk_hw *hw)
>  {
>         struct scmi_clk *clk = to_scmi_clk(hw);
>  
> -       return scmi_proto_clk_ops->enable_atomic(clk->ph, clk->id);
> +       return scmi_proto_clk_ops->enable(clk->ph, clk->id, true);
>  }
>  
>  static void scmi_clk_atomic_disable(struct clk_hw *hw)
>  {
>         struct scmi_clk *clk = to_scmi_clk(hw);
>  
> -       scmi_proto_clk_ops->disable_atomic(clk->ph, clk->id);
> +       scmi_proto_clk_ops->disable(clk->ph, clk->id, true);
>  }
>  
>  /*



More information about the linux-arm-kernel mailing list