[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0c7f583b-ad19-3010-f7a8-e6999f5477e1@oss.nxp.com>
Date: Mon, 20 Mar 2023 13:45:20 +0800
From: Peng Fan <peng.fan@....nxp.com>
To: Adam Ford <aford173@...il.com>, linux-clk@...r.kernel.org
Cc: aford@...conembedded.com, Abel Vesa <abelvesa@...nel.org>,
Peng Fan <peng.fan@....com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] clk: imx: composite-8m: Add support to determine_rate
On 3/19/2023 9:21 PM, Adam Ford wrote:
> Similar to imx/clk-composite-93 and imx/clk-divider-gate, the
> imx8m_clk_composite_divider_ops can support determine_rate.
> Without this the parent clocks are set to a fixed value, and
> if a consumer needs a slower reate, the clock is divided, but
> the division is only as good as the parent clock rate.
>
> With this added, the system can attempt to adjust the parent rate
> if the proper flags are set which can lead to a more precise clock
> value.
>
> Signed-off-by: Adam Ford <aford173@...il.com>
>
> diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c
> index cbf0d7955a00..3b63e47f088f 100644
> --- a/drivers/clk/imx/clk-composite-8m.c
> +++ b/drivers/clk/imx/clk-composite-8m.c
> @@ -119,10 +119,17 @@ static int imx8m_clk_composite_divider_set_rate(struct clk_hw *hw,
> return ret;
> }
>
> +static int clk_divider_determine_rate(struct clk_hw *hw,
> + struct clk_rate_request *req)
> +{
> + return clk_divider_ops.determine_rate(hw, req);
> +}
> +
> static const struct clk_ops imx8m_clk_composite_divider_ops = {
> .recalc_rate = imx8m_clk_composite_divider_recalc_rate,
> .round_rate = imx8m_clk_composite_divider_round_rate,
> .set_rate = imx8m_clk_composite_divider_set_rate,
> + .determine_rate = clk_divider_determine_rate,
Please align the name with imx8m_ as prefix. Other than that:
Reviewed-by: Peng Fan <peng.fan@....com>
> };
>
> static u8 imx8m_clk_composite_mux_get_parent(struct clk_hw *hw)
Powered by blists - more mailing lists