linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Abel Vesa <abel.vesa@linaro.org>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: linux-kernel@vger.kernel.org, michael@amarulasolutions.com,
	Amarula patchwork <linux-amarula@amarulasolutions.com>,
	Abel Vesa <abelvesa@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH] clk: imx: DRY cleanup of imx_obtain_fixed_clock_hw()
Date: Mon, 21 Nov 2022 21:19:31 +0200	[thread overview]
Message-ID: <Y3vPQ4A/hjYHs8vD@linaro.org> (raw)
In-Reply-To: <20221113180945.1626061-1-dario.binacchi@amarulasolutions.com>

On 22-11-13 19:09:44, Dario Binacchi wrote:
> The imx_obtain_fixed_clock() and imx_obtain_fixed_clock_hw() functions
> behave pretty similarly, DRY and call one from another.
> 
> No functional changes intended.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
>  drivers/clk/imx/clk.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c
> index 5582f18dd632..573b1a6ca1dc 100644
> --- a/drivers/clk/imx/clk.c
> +++ b/drivers/clk/imx/clk.c
> @@ -104,9 +104,7 @@ struct clk_hw *imx_obtain_fixed_clock_hw(
>  {
>  	struct clk *clk;
>  
> -	clk = imx_obtain_fixed_clock_from_dt(name);
> -	if (IS_ERR(clk))
> -		clk = imx_clk_fixed(name, rate);
> +	clk = imx_obtain_fixed_clock(name, rate);

NACK here. You're switching to a non "clk_hw" based variant that
should/would be removed in the near future.

In the future, we want the clock providers to not used "clk" based APIs.

Rule is, AFAIR, to use "clk" based APIs in clock consumer drivers only,
while using "clk_hw" based APIs in clock provider drivers only.

Right now, only the imx5 and vf610 clock provider drivers still use the
'clk' based API. Once those are switched to 'clk_hw' based, all the 'clk'
i.MX specific APIs will be removed for good.

>  	return __clk_get_hw(clk);
>  }
>  
> -- 
> 2.32.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-21 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13 18:09 [PATCH] clk: imx: DRY cleanup of imx_obtain_fixed_clock_hw() Dario Binacchi
2022-11-21 19:19 ` Abel Vesa [this message]
2022-11-23  7:47   ` Dario Binacchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y3vPQ4A/hjYHs8vD@linaro.org \
    --to=abel.vesa@linaro.org \
    --cc=abelvesa@kernel.org \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@amarulasolutions.com \
    --cc=mturquette@baylibre.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).