From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A787A2D0626; Mon, 25 Aug 2025 08:41:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756111298; cv=none; b=k6OVyQ3xQ+YRvllbFq8HtzBlxNy/hU1elnYi+iOEBhWZDy5jxlmZYMwSqL+xKp7k2Z3u1nw/LVajH6Qf015iAhdciEsYB71+bq6yd7HdgyxSxOYeYHiwoi5bP1jWjVFZ7nkFVRZK1kBSS13i3/aOT9Y755ZgtAx4/h8/OvjkbGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756111298; c=relaxed/simple; bh=QBpsTTorkc4pTkqdyLYFQrl7G/3d/UIHjKHmGDhjvh8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=os/uEZq/hCt4NHbRVpLtcRO2oCrqIdcZSarRsZGQY+OAKotvcnLhPN1rCbGXyZxUCSVVOTKgCCV0yTDW9jwJVlCgQYk3OeINMCr6ku0ep1Urk3auIRdP5uvonEAietL2EI6r/Sg/GTSpqWH2s0CWet0v4YM0bAIwG+RiQM1lGLE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Gc94G2p0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Gc94G2p0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86D14C116B1; Mon, 25 Aug 2025 08:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756111298; bh=QBpsTTorkc4pTkqdyLYFQrl7G/3d/UIHjKHmGDhjvh8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gc94G2p0qbx0jlafND6WSRRDnjNbakv8JEjLETlT1wvutg3+AKWAm9shTWfHSh9nH T3texahUXyK7O2oESbwoBQBkFFAJ3KFnYqMT+ZeGTLrgd0yWOnXXMJNOOub9b6eZI4 JrKqx6X1NQNrc11YZTMBuP3PvLEcW0W2sbbEeCdQbPszV7fGgdNErXWZKIKoECTuXj JAjAzrvziLXDJ4eGJMeZFJR8kqTAzP5Crlc95tXJwtxy5c+mIbpcVZc0GjmMuNWbUV NQjvrL/A+++kZ/GkL8H/vC77AZONQxtF8wgd/bwy1pjDXOppGKbfgT+fCUOjE0Ahlx OMRZXPhsipZpg== Date: Mon, 25 Aug 2025 16:41:35 +0800 From: Yixun Lan To: bmasney@redhat.com Cc: Michael Turquette , Stephen Boyd , Sudeep Holla , Cristian Marussi , Chen Wang , Inochi Amaoto , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Paul Cercueil , Keguang Zhang , Taichi Sugaya , Takao Orito , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jacky Huang , Shan-Chun Hung , Vladimir Zapolskiy , Piotr Wojtaszczyk , Paul Walmsley , Samuel Holland , Yixun Lan , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Orson Zhai , Baolin Wang , Chunyan Zhang , Maxime Coquelin , Alexandre Torgue , Michal Simek , Maxime Ripard , Andreas =?iso-8859-1?Q?F=E4rber?= , Manivannan Sadhasivam , Sven Peter , Janne Grunau , Alyssa Rosenzweig , Neal Gompa , Eugeniy Paltsev , Ray Jui , Scott Branden , Broadcom internal kernel review list , Max Filippov , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Palmer , Romain Perier , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Bjorn Andersson , Geert Uytterhoeven , Heiko Stuebner , Andrea della Porta , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Qin Jian , Viresh Kumar , Ulf Hansson , Luca Ceresoli , Alex Helms , Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Nobuhiro Iwamatsu , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sophgo@lists.linux.dev, linux-mips@vger.kernel.org, imx@lists.linux.dev, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com, linux-actions@lists.infradead.org, asahi@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, soc@lists.linux.dev Subject: Re: [PATCH 051/114] clk: spacemit: ccu_pll: convert from round_rate() to determine_rate() Message-ID: <20250825084135-GYC1096417@kernel.org> References: <20250811-clk-for-stephen-round-rate-v1-0-b3bf97b038dc@redhat.com> <20250811-clk-for-stephen-round-rate-v1-51-b3bf97b038dc@redhat.com> Precedence: bulk X-Mailing-List: asahi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250811-clk-for-stephen-round-rate-v1-51-b3bf97b038dc@redhat.com> Hi Brian, On 11:18 Mon 11 Aug , Brian Masney via B4 Relay wrote: > From: Brian Masney > > The round_rate() clk ops is deprecated, so migrate this driver from > round_rate() to determine_rate() using the Coccinelle semantic patch > on the cover letter of this series. > > Signed-off-by: Brian Masney Reviewed-by: Yixun Lan > --- > drivers/clk/spacemit/ccu_pll.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/spacemit/ccu_pll.c b/drivers/clk/spacemit/ccu_pll.c > index 45f540073a656c0edc341a903acc3f2405971fc9..d92f0dae65a490e9db52f25a538a518baa487ea8 100644 > --- a/drivers/clk/spacemit/ccu_pll.c > +++ b/drivers/clk/spacemit/ccu_pll.c > @@ -125,12 +125,14 @@ static unsigned long ccu_pll_recalc_rate(struct clk_hw *hw, > return entry ? entry->rate : 0; > } > > -static long ccu_pll_round_rate(struct clk_hw *hw, unsigned long rate, > - unsigned long *prate) > +static int ccu_pll_determine_rate(struct clk_hw *hw, > + struct clk_rate_request *req) > { > struct ccu_pll *pll = hw_to_ccu_pll(hw); > > - return ccu_pll_lookup_best_rate(pll, rate)->rate; > + req->rate = ccu_pll_lookup_best_rate(pll, req->rate)->rate; > + > + return 0; > } > > static int ccu_pll_init(struct clk_hw *hw) > @@ -152,6 +154,6 @@ const struct clk_ops spacemit_ccu_pll_ops = { > .disable = ccu_pll_disable, > .set_rate = ccu_pll_set_rate, > .recalc_rate = ccu_pll_recalc_rate, > - .round_rate = ccu_pll_round_rate, > + .determine_rate = ccu_pll_determine_rate, > .is_enabled = ccu_pll_is_enabled, > }; > > -- > 2.50.1 > > -- Yixun Lan (dlan)