From: Peng Fan <peng.fan@oss.nxp.com>
To: Adam Ford <aford173@gmail.com>, linux-clk@vger.kernel.org
Cc: aford@beaconembedded.com, Abel Vesa <abelvesa@kernel.org>,
Peng Fan <peng.fan@nxp.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] clk: imx: composite-8m: Add support to determine_rate
Date: Mon, 20 Mar 2023 13:45:20 +0800 [thread overview]
Message-ID: <0c7f583b-ad19-3010-f7a8-e6999f5477e1@oss.nxp.com> (raw)
In-Reply-To: <20230319132120.6347-2-aford173@gmail.com>
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@gmail.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@nxp.com>
> };
>
> static u8 imx8m_clk_composite_mux_get_parent(struct clk_hw *hw)
next prev parent reply other threads:[~2023-03-22 12:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 13:21 [PATCH 0/3] clk: imx: Improve imx8mm/imx8mn LCDIF clocks Adam Ford
2023-03-19 13:21 ` [PATCH 1/3] clk: imx: composite-8m: Add support to determine_rate Adam Ford
2023-03-20 5:45 ` Peng Fan [this message]
2023-03-19 13:21 ` [PATCH 2/3] clk: imx8mm: Let IMX8MM_CLK_LCDIF_PIXEL set parent rate Adam Ford
2023-03-20 3:30 ` kernel test robot
2023-03-19 13:21 ` [PATCH 3/3] clk: imx: Let IMX8MN_CLK_DISP_PIXEL " Adam Ford
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=0c7f583b-ad19-3010-f7a8-e6999f5477e1@oss.nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=abelvesa@kernel.org \
--cc=aford173@gmail.com \
--cc=aford@beaconembedded.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--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=mturquette@baylibre.com \
--cc=peng.fan@nxp.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
all inboxes | Powered by JetHome®