From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2CB3CCD1A5 for ; Mon, 20 Oct 2025 12:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9J9nR5CUw7ryFQbk4vm9HTQ3BzB2rCZ5ggI0MzlpFmc=; b=1hQvkdvSxOu2jr r3zCfF073ZnNlj2mi0fNIbz5hp9Khw4w7Thf+h9dgH9j3oyU1IIsPSQPx8GJ/OJ1iOshcti9S63v4 s3N0JVLklYBtz75Gyto5PbN+Q8fqwUtFZJ8eo2Yc8m8Cvm95gWwcAlfFtutfc3jM6FzPMItKzWzdj MnBv5U/F+0eqlIe7R4fvL+iPAKRgxRjkkHifVXPa1Vt0/LLU//RHXJb6aK2+5yp0IimCZDpwEzLet Pvj24n634YhnZ2WITcFCAYh2wmx9srb66tljxaoRw6S4im/ah6cg0fJ0ctEJSeErCKH1rmZNM3yPS 7Utaow7IOhu5/NmHC3Mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vAoc8-0000000DHHx-3Xb1; Mon, 20 Oct 2025 12:03:48 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1urFy8-0000000FXPW-09U0 for linux-rockchip@lists.infradead.org; Wed, 27 Aug 2025 13:13:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756300419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=13LJOrVZbt5/bZNb1010AyPGLHEYUJgw1i+wJLdf1Rs=; b=VqgPJcTcl2JeQJEZ1Mn4AmESXKhbfjTTWo54Mr6sSuGUXQyzp/v/X4DCUFx2aPtvGjiI+D L+BXKXyO5+59OqWZswOgbem09sDNOciD/PfYPOKfhMIOC0mqy46+JkO1c2UC5Vh30tbfWZ /s9VExVLGUsmPk3yYYZla0JxAXDEHwE= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-CrzYCl1SOVufiTzRz71IFA-1; Wed, 27 Aug 2025 09:13:35 -0400 X-MC-Unique: CrzYCl1SOVufiTzRz71IFA-1 X-Mimecast-MFC-AGG-ID: CrzYCl1SOVufiTzRz71IFA_1756300415 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7e86499748cso248864485a.1 for ; Wed, 27 Aug 2025 06:13:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756300405; x=1756905205; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=13LJOrVZbt5/bZNb1010AyPGLHEYUJgw1i+wJLdf1Rs=; b=aWYzWa7fPgCN8FeFZk5xSR+2f4LGuITAcRaVimmuwvmULMTa01oLhXM+kSOwQ/hffV w6j5zbQ8BxGqQ1P14f8qvsth45KI3cFqKju0noraFFFGLJAgSi3m60M4dv+O/PHzxbaF EAiwoHgKDaZ9L78TQvbaX9jTehfQ1v7eLCy6zv/zezuXRBtL40r2DhdAKluhrSNAHk+d +zYrU3ZBcuMuVPTcJxdSKWoToyz8wkMCWLH1Wlf9vHJvhLVrFlvCbsfD0oUqIPPtPrIp Q4Tn2X6u1fe5mI2s0uvY5rYXBaf926opvVj+5RQauX7vZvbeQV2zuchRLVCPj3+KwuNX pYuA== X-Forwarded-Encrypted: i=1; AJvYcCXiD+8E6nQ5UJ7QsjadW/ySO119A9GWE8k20o4Ai/1YjH2JgzwtXMlVVsOzed3YtCXHHxFVRddbe2aMndpPjA==@lists.infradead.org X-Gm-Message-State: AOJu0YxeWji8RgWhLYhYsdqWhmtUib/1IRZ56sUBGXPBGaFr6bKrJLVR y7mAioPG0S0PHDCREQN+6FL05rbg6SJDpzZHlnl73WNtV+e9Zbni2dcz2mMYOOrHFOwyICgk2Cn 0AkxXbRGk7BM2UYR7khnhHX/1gJHtwmvdFGTIJoWH9u5Mg5fbbBilwqGhTw1tnGTNcNO2yAEAZg == X-Gm-Gg: ASbGncunfdSiSGWxO2d8fahj9C2P9GsYICF+iFvDCaR+CgAWLBnIYTUhHX2RWVQh6XB EmGgNZDpPq8VNrM6Z3fN4jy0ihA2i77wySJRagJ1LFuTi67Hr8waxjaZa49i9CRs5UjDeylQQaU 1G8XUCoLrqSsgIRE9zcuYUjVGcT9jY7YVrwwnCFr0NFDnwADA3TCARfrENvyjGNOf/QmhSKXtZA TDOn3QixAD5LeL/x1CwhFRywGOy4msAp7HmNTk2rVcK9Ainds1N/cyJbly1ckhQsm0y/dEXzEOX j7yHX+Kdwa3MWz8XVkXDqptRK9x9ZDvh218k3hDRp0g8ljiRdZuZ4wzU5dYM99OTJ06hSNP1GXe ArhNma0HVZnAMgx+jYG0= X-Received: by 2002:a05:620a:7101:b0:7ed:92c8:7d16 with SMTP id af79cd13be357-7f58d941f59mr592254485a.31.1756300405022; Wed, 27 Aug 2025 06:13:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG//kDH7SoWg5eCSBiMLHP3nCnmfnmaReGS2V45T15TfIErjBPeekutHDc1uHZhw0fUtcQytQ== X-Received: by 2002:a05:620a:7101:b0:7ed:92c8:7d16 with SMTP id af79cd13be357-7f58d941f59mr592238785a.31.1756300403878; Wed, 27 Aug 2025 06:13:23 -0700 (PDT) Received: from x1 (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7ebeca23e10sm885475785a.6.2025.08.27.06.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Aug 2025 06:13:22 -0700 (PDT) Date: Wed, 27 Aug 2025 09:13:17 -0400 From: Brian Masney To: Peng Fan Cc: Sudeep Holla , Cristian Marussi , Michael Turquette , Stephen Boyd , 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 112/114] clk: scmi: remove round_rate() in favor of determine_rate() Message-ID: References: <20250811-clk-for-stephen-round-rate-v1-0-b3bf97b038dc@redhat.com> <20250811-clk-for-stephen-round-rate-v1-112-b3bf97b038dc@redhat.com> <20250827070933.GB18994@nxa18884-linux.ap.freescale.net> MIME-Version: 1.0 In-Reply-To: <20250827070933.GB18994@nxa18884-linux.ap.freescale.net> User-Agent: Mutt/2.2.14 (2025-02-20) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: DzbUhPBVahMe7wWznBGBgy7buF3mpDLP4UoXsmt5z-Y_1756300415 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250827_061340_158261_AAD035E9 X-CRM114-Status: GOOD ( 24.02 ) X-Mailman-Approved-At: Mon, 20 Oct 2025 04:56:36 -0700 X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Wed, Aug 27, 2025 at 03:09:33PM +0800, Peng Fan wrote: > Hi Brian, Sudeep, Cristian > > On Mon, Aug 11, 2025 at 11:19:44AM -0400, Brian Masney via B4 Relay wrote: > >From: Brian Masney > > > >This driver implements both the determine_rate() and round_rate() clk > >ops, and the round_rate() clk ops is deprecated. When both are defined, > >clk_core_determine_round_nolock() from the clk core will only use the > >determine_rate() clk ops, so let's remove the round_rate() clk ops since > >it's unused. > > > >Signed-off-by: Brian Masney > >--- > > drivers/clk/clk-scmi.c | 30 ------------------------------ > > 1 file changed, 30 deletions(-) > > > >diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c > >index d2408403283fc72f0cf902e65f4c08bcbc7b4b0b..6c6ddb92e7cf6a0cfac2c7e19c0f15f777bb8c51 100644 > >--- a/drivers/clk/clk-scmi.c > >+++ b/drivers/clk/clk-scmi.c > >@@ -54,35 +54,6 @@ static unsigned long scmi_clk_recalc_rate(struct clk_hw *hw, > > return rate; > > } > > > >-static long scmi_clk_round_rate(struct clk_hw *hw, unsigned long rate, > >- unsigned long *parent_rate) > >-{ > > I see the point of round_rate is not used if determine_rate is there. > But reading the code of round_rate, It might be better to rename > scmi_clk_round_rate to scmi_clk_determine_rate. > > Anyway, need Sudeep and Cristian to comment. In this case, yes the round_rate implementation is filled out, whereas the determine_rate lets the firmware handle it, and scmi_clk_recalc_rate() will later populate the rate the clock is running at. I can convert round_rate over to determine_rate in this case, however it would be a change to what's there now, and risks a regression. Here's the relevant code from drivers/clk/clk.c where the determine_rate and round_rate ops are called: static int clk_core_determine_round_nolock(struct clk_core *core, struct clk_rate_request *req) { ... if (clk_core_rate_is_protected(core)) { req->rate = core->rate; } else if (core->ops->determine_rate) { return core->ops->determine_rate(core->hw, req); } else if (core->ops->round_rate) { rate = core->ops->round_rate(core->hw, req->rate, &req->best_parent_rate); ... If Sudeep / Cristian want the round rate converted to determine rate in this driver, then I can do that in a v2. Brian _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip