From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 21468C120 for ; Sun, 10 Aug 2025 22:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865968; cv=none; b=jf/y4P6uT9c/Cvh7Spv+de5HrJnIO1dT8FaTEnWeDGgNVjPDXkvsUMbh3VBv9F2t/7rjKcHOxQyadAdlO6aWhMvpKKI5kvwY27KE3Iz36I56THIQCCmgZVfKxvdiLJt6h8mBHtviRTOpKrarUkF1h9OL1aF4gy/TYZLkcxTVL6k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865968; c=relaxed/simple; bh=a0rSL2H1S/HUaruR4lcZ7Ks+0rkYUs1GnZzD7mNCe3M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=barHdatJIQ/dOqE/728whdnQ2yBZF82KLmrZwBhGbfCg8NSkAQmRPUYbE98A7yZIVnDEktkBOf36wsRIXO5ESGVoaDrBeroa+DPgo1sItNjiW3qNBxETEizoAQD2lJjBDS0VV00v8lKK/M+DRCF+XIr98RobOMu2iqnrbyLxoDE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YLCOyhnN; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YLCOyhnN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754865964; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vnGrlNLU39XteVbV9vgE2Sk+xvdwKQpHrkhTkr/Vktc=; b=YLCOyhnNu8Lo2cheCKTiEY7w5DLJoJtVg5qqFckzh1v7FkwX/feV69fZiqP4KBKJKkqRNr DDak+J/bfcW4LysrGrSfhVHoHehzGaShW0X3cvmExmxn4UpIGXkcGUfpTzH42vHca2zgPX i4mqEQ7d7KZ/Igpmgc3EofTSNUGuPTI= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-360-CkqNjckiPS2hv_mL0SNcGQ-1; Sun, 10 Aug 2025 18:46:02 -0400 X-MC-Unique: CkqNjckiPS2hv_mL0SNcGQ-1 X-Mimecast-MFC-AGG-ID: CkqNjckiPS2hv_mL0SNcGQ_1754865962 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4b085852fb8so157974411cf.3 for ; Sun, 10 Aug 2025 15:46:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754865962; x=1755470762; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vnGrlNLU39XteVbV9vgE2Sk+xvdwKQpHrkhTkr/Vktc=; b=DsVPOWbNzn9N6n/TxHO2A8vGgsnlPmwofYAHhC0icV2DBaIR1tWej9OISdIPXl8VCf sXTCb0s3ilcHUm+Z2BMFQnIrVE+Cb5t1vCFWUNq5j2IJyKudZx0hhA9numlQoEQFHcRq 3NuUehPJFHQM3FvAOzZk5Fp6NK/GldIgLPwOgfd0KMcMGa/OOBr3hU+pKzIK5GbUjOUi lpV8h4DhhyDZYHhhD+X1Qc27TI7lV8bVefJf5i5Mp6fqHgoLfBEml2O9iz+tX5aERODq 3bq3ne5McfG7XAI4FvSJsHrYlLicvIU+GaHAXKoAY7dwbN4BE5+54dLcD6ss3yuUgJsI hTUg== X-Forwarded-Encrypted: i=1; AJvYcCWDM8x/nx11arAfGI+zg+UwvmYwFGJk3TniPUdBvGG6aAXMalR59+PRJdObF9i/gvRLtG9f3Na4q0dgkL0=@vger.kernel.org X-Gm-Message-State: AOJu0YwyHoJzKwfDiRmuDp4C7hWKc8GLcniU5Q2F28QpDqouAJuioDow Guh3LwLQ9NCz1GXqzQ7mqPs5eHJIvRT3y4fW0YQOgwwAdfkCXIbiS1YSPiJGXnQfKjp3rnRS1d4 oO38thwRMD0mkBHjphm4k+Q3bYLavcOLWrM2ubLqdz0LnOGyKJcJTT32FlNy214GGRA== X-Gm-Gg: ASbGncsGnS0PQUHuP+Dhgvut7ysDcc8VZr5WIZ+5ZJB0tvX7mahkS8y4Ss7d0/mTzBC LItC7NIRAyzpj5Sx7BZ6d4j7XbqkTCEXwqGOVOE/PhNRfCoMxOG+ewt2fEmDCzb0SSqksyAUBnw ISasgXLcZBb2TUh0PWIa83zxRSbRBXGViLcHRzVquj4Sx9oGm174rOrMHQc6haUjmsv9bPQyIAy g3undkc2vl+Oj9AbaiyeIBgZzIS5KKTHkgytDkRZ7N+7l/ZDutfpNBVbKFWWX7QwNgyvW0NICYm Am0+pUsKxdF3CGqXKZ8q5qvuoY3og+hikmMrRAA0W4amBns0wJ3v7eDwZ5iDTqu1oCNNWQHNCCH KeEORZQ== X-Received: by 2002:a05:622a:1910:b0:4b0:77ae:17bb with SMTP id d75a77b69052e-4b0aed3134dmr164413221cf.14.1754865962215; Sun, 10 Aug 2025 15:46:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUie+6kdU1EHKp7zY7Gli2dqcxw3eGLN8zRdb828DF1xFrgrp8MAMR0KX4wPSSD6n4ZYgkPA== X-Received: by 2002:a05:622a:1910:b0:4b0:77ae:17bb with SMTP id d75a77b69052e-4b0aed3134dmr164412901cf.14.1754865961731; Sun, 10 Aug 2025 15:46:01 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:46:00 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:29 -0400 Subject: [PATCH v2 1/9] phy: freescale: phy-fsl-samsung-hdmi: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-1-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865940; l=1978; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=a0rSL2H1S/HUaruR4lcZ7Ks+0rkYUs1GnZzD7mNCe3M=; b=/U1k55v3iKOX6MHHG4y2eGAMFrca8JkeVtSpJcoc1Z54FeYml6kJU2G+QOt1KduqEhi06mYeN FwMvRbQ0c3QASmeUiY3XU6Pm6Wwj0gFLroBs3uKkqqGAWHVZhKteVKw X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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 --- drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c b/drivers/phy/fre= escale/phy-fsl-samsung-hdmi.c index 191c282246d96e3f6c5a8d17abe078892882bf44..d010fec15671d33cc363af79e9f= 1c3f26ecb3464 100644 --- a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c +++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c @@ -570,17 +570,20 @@ const struct phy_config *fsl_samsung_hdmi_phy_find_se= ttings(struct fsl_samsung_h return fract_div_phy; } =20 -static long fsl_samsung_hdmi_phy_clk_round_rate(struct clk_hw *hw, - unsigned long rate, unsigned long *parent_rate) +static int fsl_samsung_hdmi_phy_clk_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct fsl_samsung_hdmi_phy *phy =3D to_fsl_samsung_hdmi_phy(hw); - const struct phy_config *target_settings =3D fsl_samsung_hdmi_phy_find_se= ttings(phy, rate); + const struct phy_config *target_settings =3D fsl_samsung_hdmi_phy_find_se= ttings(phy, + req->rate); =20 if (target_settings =3D=3D NULL) return -EINVAL; =20 dev_dbg(phy->dev, "round_rate, closest rate =3D %u\n", target_settings->p= ixclk); - return target_settings->pixclk; + req->rate =3D target_settings->pixclk; + + return 0; } =20 static int fsl_samsung_hdmi_phy_clk_set_rate(struct clk_hw *hw, @@ -599,7 +602,7 @@ static int fsl_samsung_hdmi_phy_clk_set_rate(struct clk= _hw *hw, =20 static const struct clk_ops phy_clk_ops =3D { .recalc_rate =3D phy_clk_recalc_rate, - .round_rate =3D fsl_samsung_hdmi_phy_clk_round_rate, + .determine_rate =3D fsl_samsung_hdmi_phy_clk_determine_rate, .set_rate =3D fsl_samsung_hdmi_phy_clk_set_rate, }; =20 --=20 2.50.1 From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 661D1C120 for ; Sun, 10 Aug 2025 22:46:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865975; cv=none; b=UyzLe1H+DHoo+hU8BHB28XXkhqqFjE2FwX9J6W7rIC6zLpFvkJM/KlsZodv7GGQdemPVcC1XTwftQSe1AZ0XeqfK+lyYl3r+DU14TVOYAT4CiS34RPUZi/31F/GmWKwzcfxB8/5EnoT30T1ZEyqlCP0X6kJsY29sm1YSkRvj5YA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865975; c=relaxed/simple; bh=K/vzlwQbHrPXAsE0zMa+ZWELLEN88HFuPFzZqi1CGSY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aTHdo2d8HAGV/rBlxNR4jX1NksohAoFLprhMaiEkUcmOhDgvIXykNWXqFG3Xok7rUhdQ45W1g9nfT8J3hHwGD0pmpG2b8y2kVwc1mVrZfSJQfc7w7oQeNaqdzAQ6TBOkoH83FciybjRIqOVio0UNaPgeEDskRkKD7uX5KsBWbws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Ps/tSGwr; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ps/tSGwr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754865973; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uno9AFMoEyhj2DAPDWvWv4t+hFccS8StsfhUFSrHj9I=; b=Ps/tSGwrCIvminyGZUwkO38K5LMaP1YDhcaUPpNGsROBDdRNoOWgGNJFHPQ5NUI/rRLeM4 FoEnvRj2hY8QpykUCyS7Nt2zE7Mfs/KP62684XDDie2f2w9LfceXkakBMGMe7B6xP+I21R CJGikGE/cHDQKoQBc2M8tx7i0vjR2fg= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-84-cTXwUITrMsW772L_ZQ6ehw-1; Sun, 10 Aug 2025 18:46:11 -0400 X-MC-Unique: cTXwUITrMsW772L_ZQ6ehw-1 X-Mimecast-MFC-AGG-ID: cTXwUITrMsW772L_ZQ6ehw_1754865971 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-4af117ffc70so100691851cf.1 for ; Sun, 10 Aug 2025 15:46:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754865971; x=1755470771; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uno9AFMoEyhj2DAPDWvWv4t+hFccS8StsfhUFSrHj9I=; b=GY1YenDIBxRG01VINFpB1OLISpifPTIfTK3Ey1g9IxBI/cUxN3DlML+UkhYhaXoXax qhjb+dbQM7MCV9pSYLtV1y/KlFUIInBsOcELSNsUR+cyvP4GLwjGYE++PFyLqtvUrOq+ eSvMC0O1tw904TDYnoJGcbMXro9b0ymWdjNz5vxZzbrUkva13A9t2gwcX9sZQ4bo3r6I OUmbh97oZIL5ctd8eppCFyGcg482c35jwv8S+0+hml0ZqqzSEtYmx+q/udPvZ2QCNXIx 9axo39kIRi2QNRlbz2rg4er3/+si1SsOf07uqt+Iad1wRuK8207KaxXDm+NFroJ/tR7o jykQ== X-Forwarded-Encrypted: i=1; AJvYcCWEO5xo4DrkuKUAiYMD3cpSc7soGl6pAieK+Pf9aM6ixnJs7a9O6VWh3yWa87ZkwzElGo+isJSFubcM09A=@vger.kernel.org X-Gm-Message-State: AOJu0YzRzao/0za7ZhzrWC+I+oSJdKDGzlR6c4AeybjCzBuqFvkGNNE+ UO6KNtczGtpTZmjleWMASX1ErW98iHKE/U0WpG7ZGkB64vNqsVcuv7VXaV/Elg7kvfWw/f+H7By xwQ6v7kjBXIubT2HDfVvGGsvW+4n6W8UTT9qrH9ugnBvHO4D16m+Ss+5C1bS7lvj6Cw== X-Gm-Gg: ASbGnctM35PZuxFINO860aFjbQoK0JDI9nf1ZUbqItdtBEcjYHlljaKh2wUZNNtwgZl DhmWzBvTMyv0D7BBPVGknVrh1l+YyLo+YP7wqvV9LE+p/snBlOMB7XWPjBVXEM45QTzRIcttEOv y9ZCLY4hAjVvwMAKn5PgIbtJ/vdlTmxJ7wBqqTXCodfJgUQmJZkdtHnuhR8dMhxTrw+P+/X3jwr qkDdLVBPr/mUAFlUm7j5C4Rqrm3u9si5d5u1WTY66eXGofQ3CBHLlgXGxoqBWxU713uz/jZQw5b wt1Lk7UdAotCAuM5gYn9jPZQLhxC3AlR+ypD+DMfmSoxjWR8+eRzxUT3g17IZzGi1gp5I0JHypV /GtLslQ== X-Received: by 2002:a05:622a:1304:b0:4b0:dedc:1176 with SMTP id d75a77b69052e-4b0dedc131cmr16273881cf.49.1754865970552; Sun, 10 Aug 2025 15:46:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjMTodXpCZJI+V6X66BJdKc/nrAgZZBHfrq0FWIY+BTXEFv3Zqfof1whkxmm2vRWEJM7gJDQ== X-Received: by 2002:a05:622a:1304:b0:4b0:dedc:1176 with SMTP id d75a77b69052e-4b0dedc131cmr16273521cf.49.1754865970110; Sun, 10 Aug 2025 15:46:10 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:46:08 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:30 -0400 Subject: [PATCH v2 2/9] phy: mediatek: phy-mtk-hdmi-mt2701: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-2-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865940; l=1429; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=K/vzlwQbHrPXAsE0zMa+ZWELLEN88HFuPFzZqi1CGSY=; b=qwO8ilR67ycB5abLTz8lkcaaMraMyT4Kb+y602Glvxo2Z7+fRcKOb5tXSI4yVR6HcJvX+lHrH QHpiy2uGNJpBVV9WhaW5knt2IT2dHcrLcTidOIeNTq7nKUw5m+AZu3i X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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 --- drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c b/drivers/phy/media= tek/phy-mtk-hdmi-mt2701.c index e51b2d13eab473dddace48c75c2a8d73c8c65635..b0b6497e7eedcb6867541b573d2= 2156ded29a4d5 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c @@ -90,10 +90,10 @@ static void mtk_hdmi_pll_unprepare(struct clk_hw *hw) usleep_range(80, 100); } =20 -static long mtk_hdmi_pll_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int mtk_hdmi_pll_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { - return rate; + return 0; } =20 static int mtk_hdmi_pll_set_rate(struct clk_hw *hw, unsigned long rate, @@ -170,7 +170,7 @@ static const struct clk_ops mtk_hdmi_phy_pll_ops =3D { .prepare =3D mtk_hdmi_pll_prepare, .unprepare =3D mtk_hdmi_pll_unprepare, .set_rate =3D mtk_hdmi_pll_set_rate, - .round_rate =3D mtk_hdmi_pll_round_rate, + .determine_rate =3D mtk_hdmi_pll_determine_rate, .recalc_rate =3D mtk_hdmi_pll_recalc_rate, }; =20 --=20 2.50.1 From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 A977E2D77E5 for ; Sun, 10 Aug 2025 22:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865982; cv=none; b=Z/sNUXUchBC4oELrziwGsTMO1qF4Js9IYzzX3H2GN9a9P83ORzkuQFaISX13Zy4YAnMUkrk4kGQ5AlCAxFvtwAzd8X/U+hXAm9Jb1DtWFtlpgiw9C8ze87ZH6s5pzyUL4hwlTZy/x7S0viDQr6A7ZVmT6uRcz6GlU9kZhyiisZA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865982; c=relaxed/simple; bh=+ttqLK3CCvX22rG8r1u2aky/pyqBIfYJ3wcP4wTqxkI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qGr4MZPNmoetg1AICobDAARhUJzkcWjrysKfu4mYdYB0aUQe6mZcJ+cHuJ5D7P0eriUxWB7LS+vpL+bKsCz7/1rOelf2Py7Mk9aGYDr6jmCZa5fC5C22xCZaUXDFAWqBmueiek+87+kpl9lSPUCpQTN/xMBq9HEiltg1sui9t0E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Iy58V6RB; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Iy58V6RB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754865979; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CYtRvLWH1nEitW0lp1POxLyrQ3/VdPLRfNjB0vWutHg=; b=Iy58V6RBGZiiCVIntGmv0oNMbs9BskuJb37wGIhNqB9MYZoT5IkIzVHKq8eq+DFW4WIdnQ s+5//FDhOm7JyGtL+t5SvMYoYn4Xini3DtNkPDl/YRFHdxoHY2971/bkoOZBoqskYQiMxI mnx/UGBw9hzgSEFBsRB9Vdv6wF8Snsw= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-34-ilSe1Bf-Ph2OLwj9GIrgsA-1; Sun, 10 Aug 2025 18:46:18 -0400 X-MC-Unique: ilSe1Bf-Ph2OLwj9GIrgsA-1 X-Mimecast-MFC-AGG-ID: ilSe1Bf-Ph2OLwj9GIrgsA_1754865977 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4b092c12825so110891111cf.1 for ; Sun, 10 Aug 2025 15:46:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754865977; x=1755470777; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CYtRvLWH1nEitW0lp1POxLyrQ3/VdPLRfNjB0vWutHg=; b=HNibgtgEoDbhVh8RB8+WbIMLz7lbeNMp4wSCm3xAHlKWvFzTnUPQRa58F1jHTaWvck zkzKxBE7oQ+d4Ph8oMswtGRNU8hS80GjvtG5jvPE1RJKHdZIBGlL5c0bWJoct23j6f37 V8xb6MB/txZffkzDU1c/LMLZnLOUnpcmwZICZYsEzroiREyQpLLj9iZJubGfMsULHNrH lqapOme+H4sMNYGEvd0YZfAmFsgR8sg5Zw3A/B85MfHn63UATvrwWpMSDyoFtNBHSmh0 KvKDqHzv2ErwSdHiGGL790il/+mQmyvwALc3q4/a8u5P2Vn8RtM1QWLJAp5ZkL9jcr3U uI3Q== X-Forwarded-Encrypted: i=1; AJvYcCVx5hbYN2g7eV9Vo4HNHbKbJ2FM3yPd4C6/ItZolvhGmcXx1cEEUB2cMxcU3jnDdKrRzM26p7nophgA5do=@vger.kernel.org X-Gm-Message-State: AOJu0YzEZYs+8E8axyNIhqy6oQfEbsYbDz3XffljVRFX19Rho7RoEGiB RqJZzmMnzidioo/ks3Lah100MKAtQfD8S1uT6SrrczXVVZNMrS0iaVK9gAo0yQmTB0tI+bwZYEN BZ/JdzJg6admDsj2yZdxU6IeztCxPQJiZfVTh8L1ICodeB390lcoSloy4m6T6TLWgFw== X-Gm-Gg: ASbGnctZDOGYmWD4R0kPM+IVfyDtr55EAYqnHgQAwoLea8Vg9rChK1Y3Opxs5cf9w4d 3U3P5WcVUsi7fOZoxs0kJl9RfTa5dcgI/gEzM6WTvdgIL+7Qfdy4OeWWRme2C0yv8bAmszNMsSq Kg8+v/K2e+ncYY9GnsBUpIar9e2OV79FM6k+7JvPHo2B1BF3NCKEuC8MF4CpHJ0JLwMQT6ugptd 5P5OtkTeCbbR9vTQBwWurS1NQ41HTrqQ3rZeuH3qyJQdsyRSdorr/EYpHPd6U+w0HA3i+dBVjvT hyJ1leqwXYC7oXpCh5FWsYULafFb7XCVpzLmdFr0X2gWavoBQ9Dedcx+yVp8pk4xET/lBp1rSlu LOLvq+g== X-Received: by 2002:a05:622a:1a93:b0:4b0:8037:c0fa with SMTP id d75a77b69052e-4b0aed93038mr151727431cf.58.1754865977530; Sun, 10 Aug 2025 15:46:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExCDCgOrUi7VTan6/AGqAAE3FbTWvD0DlZHmaitVHPb5PTrx90u14A2hmRLrvSxJ8XKrUUiA== X-Received: by 2002:a05:622a:1a93:b0:4b0:8037:c0fa with SMTP id d75a77b69052e-4b0aed93038mr151727231cf.58.1754865977145; Sun, 10 Aug 2025 15:46:17 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:46:16 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:31 -0400 Subject: [PATCH v2 3/9] phy: mediatek: phy-mtk-hdmi-mt8173: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-3-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865940; l=1767; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=+ttqLK3CCvX22rG8r1u2aky/pyqBIfYJ3wcP4wTqxkI=; b=3obEgP8yrDCMdOaBGI+w4Tat/8TZLPDL5bV/fvqowKe5RG+J17OP5TtRquid0xdyZAAnUyd/x LCD0oPAU7awC9owBT91elCcJ0kc+tWZOGloj7ttnD+fpn6ULYnrgJiH X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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 --- drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c b/drivers/phy/media= tek/phy-mtk-hdmi-mt8173.c index d04758396046363ab9edc584ae10bf31e9c5fb0f..58c6596c8c20bdacf96a97709b8= f5709f447e85b 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c @@ -118,18 +118,18 @@ static void mtk_hdmi_pll_unprepare(struct clk_hw *hw) usleep_range(100, 150); } =20 -static long mtk_hdmi_pll_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int mtk_hdmi_pll_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct mtk_hdmi_phy *hdmi_phy =3D to_mtk_hdmi_phy(hw); =20 - hdmi_phy->pll_rate =3D rate; - if (rate <=3D 74250000) - *parent_rate =3D rate; + hdmi_phy->pll_rate =3D req->rate; + if (req->rate <=3D 74250000) + req->best_parent_rate =3D req->rate; else - *parent_rate =3D rate / 2; + req->best_parent_rate =3D req->rate / 2; =20 - return rate; + return 0; } =20 static int mtk_hdmi_pll_set_rate(struct clk_hw *hw, unsigned long rate, @@ -223,7 +223,7 @@ static const struct clk_ops mtk_hdmi_phy_pll_ops =3D { .prepare =3D mtk_hdmi_pll_prepare, .unprepare =3D mtk_hdmi_pll_unprepare, .set_rate =3D mtk_hdmi_pll_set_rate, - .round_rate =3D mtk_hdmi_pll_round_rate, + .determine_rate =3D mtk_hdmi_pll_determine_rate, .recalc_rate =3D mtk_hdmi_pll_recalc_rate, }; =20 --=20 2.50.1 From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 C0EE8246770 for ; Sun, 10 Aug 2025 22:46:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865990; cv=none; b=rO8ylTAQqVhFlGO0yb2uxYF5PUxJ1T8LCIRy6pZcOChBtOg2tWtPLu1FKztsE1juEDmqKGUi9ohPueSSgfjzY6dtEcG1pHYas+eO14TM7cblLQXJff0BhGyDWPu88YhkQxKOjAyUxgRmALP3MqzmL3dC8AMaNszXEvfKAEzaOHE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865990; c=relaxed/simple; bh=zpxjkKUS3Ja5Hl82pWOZy7M8iozPUZUnjje7JplMAuQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IOH2cZEISeyBw1pAbAo4khTr2PJI5Rx1rZxdBaY8AV/XUDaSKjXJF51I3Vy0c+OgRPYaktzKq9Wx9ISw+tIoSl6ft0sOJ9Sr/yZj7++k9CVK1m4gdiL4oiP01KVS6xGTvAkgIOHGfUiy2WnhdRoNsgS00gP6BsFjKLQkchvhcLY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JyYM0QKB; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JyYM0QKB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754865987; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Xg8hqI9hY3cckPk/9kc3e4L3WNhIKfJgnhJhXBVxrY=; b=JyYM0QKBxDqkCfPEyyQbS3JULEsxpOXcgFRpKK27DDGUnkpLiWCLaD8DKOvTp62PAaGbI5 NAPIq5WRL5lCBAvJ3ykE80rx5IBCN6USQEMiuMRlEHChZXxvS4IFPqqFK0byJuxRJ3lfjG QXhN8xZn7cuuZ0Gr6CqhSMb5Y47McdQ= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-689-oUdgtH4oN2On74IGLRrH5A-1; Sun, 10 Aug 2025 18:46:26 -0400 X-MC-Unique: oUdgtH4oN2On74IGLRrH5A-1 X-Mimecast-MFC-AGG-ID: oUdgtH4oN2On74IGLRrH5A_1754865985 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7e7ff9e2738so853565085a.2 for ; Sun, 10 Aug 2025 15:46:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754865985; x=1755470785; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Xg8hqI9hY3cckPk/9kc3e4L3WNhIKfJgnhJhXBVxrY=; b=CAkScDtMAFWKWovMvRYgWlomjBLx0cSXRVQtt+uAr05Cp9AaWisLvVoBXw2hanCe8u wvynUKxWe50w0FOC0KF8JEApZKPEAw8QE7S6tWD9w8jjOM3UB+emb2mp1WgUknK3DSRd Vnwsgi7E4sT5ddKLem6oxexfZfSZXkcBi3DgzW34qIxufbaIj/MCrPW/cUpCUaeFf1YL kXksU3fp+MTMwUtyFpXPBfnHAvZxEBrczHhK0Ox5GAzzq2eu75WH1NwUzqZZQh6pgFjU Pe/tuymM2zZg050kx9kBVFO4uDpYcjeFElhIpm+9x6p/SKGF0UhGAdbwWMrrTCHMl6VI QvMw== X-Forwarded-Encrypted: i=1; AJvYcCXcR9rKfpBnmiBmoLxPKmL4FeQ2RdjvnoVo1qNATSdd7f85t/I+d8VIaG//0friPAot/lPBaAfeXbTM+7Q=@vger.kernel.org X-Gm-Message-State: AOJu0YwcZWHSOI+pTKttlkvFR3AfYLsyRriJi0XIykZked1fGOmcIsL6 62dH8SNk9yZYKO/rjWmWtAi8HSHrm8QOp4NerS/mBI0A43zPvSsJvXCfLTvMcsOBQzCDW4CjfNL 4hgL814vC5awlHRFeDiR9RecfqAmLNC1zQJOBP2UJfZwuDFo60TU4n1Er/+PhS4SuQg== X-Gm-Gg: ASbGnctzOd57wkSEd25Z/OcjEhYz5MsBF9bgVkyF9A6euiflXcyORD4Vo2WdTHZ8cPl WNarq7jtTQ87/BO8fyJGXYX6AkTaTsDr2UpxroUbuVsrj3iNsEpEBLQnlw9DEGUA5TQ+b7GtB00 yj7WAzfv7FncntND3PdA9yLX+DM2oeYcmzM8PxUCX9wJuCrF+dv0AfzcWoJpWUnJ7eAGD18uVqT +NPtTy3qAZcNbimyPDICt6T5Vjaw28UWZIDntF3AeRa8NPFTzzQq1kc0UXoNWPJC3wPaFR4VG0Z Ez5ohD9HOamq4vhd7nKemqn8oL46JfkXpT0MntAcJdengzzNtnwCDc6PAWEJNCch5mpCqTZZER6 NgdP55A== X-Received: by 2002:ac8:570f:0:b0:4b0:85de:483b with SMTP id d75a77b69052e-4b0aed794b6mr191405081cf.50.1754865985408; Sun, 10 Aug 2025 15:46:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlcV+VlJl2BMsCB1be7RUmGpPT7LkQkTuorr8gQ4HxbmtzB9yCp//naKxGcJVwwxqJ9LpWMw== X-Received: by 2002:ac8:570f:0:b0:4b0:85de:483b with SMTP id d75a77b69052e-4b0aed794b6mr191404891cf.50.1754865985003; Sun, 10 Aug 2025 15:46:25 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:46:23 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:32 -0400 Subject: [PATCH v2 4/9] phy: mediatek: phy-mtk-hdmi-mt8195: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-4-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865940; l=1601; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=zpxjkKUS3Ja5Hl82pWOZy7M8iozPUZUnjje7JplMAuQ=; b=TfkcMxwokTO3SFrhfFtRnY/2TB3MjvqVvGnOziGO+YGy6Hi3nXcV6PqOeuN7niocq8BeQPo/w 8VIsZH9GTQrClIuzbrC8guMQvM6lpDsYvdZ4R19kOLm1cKrdM3gU0VK X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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 --- drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c b/drivers/phy/media= tek/phy-mtk-hdmi-mt8195.c index b38f3ae26b3f3d8c9e73b43d86510acf6cedb471..1426a2db984d53b91125b18f772= 5738c44f19555 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c @@ -418,13 +418,13 @@ static int mtk_hdmi_pll_set_rate(struct clk_hw *hw, u= nsigned long rate, return mtk_hdmi_pll_calc(hdmi_phy, hw, rate, parent_rate); } =20 -static long mtk_hdmi_pll_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int mtk_hdmi_pll_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct mtk_hdmi_phy *hdmi_phy =3D to_mtk_hdmi_phy(hw); =20 - hdmi_phy->pll_rate =3D rate; - return rate; + hdmi_phy->pll_rate =3D req->rate; + return 0; } =20 static unsigned long mtk_hdmi_pll_recalc_rate(struct clk_hw *hw, @@ -439,7 +439,7 @@ static const struct clk_ops mtk_hdmi_pll_ops =3D { .prepare =3D mtk_hdmi_pll_prepare, .unprepare =3D mtk_hdmi_pll_unprepare, .set_rate =3D mtk_hdmi_pll_set_rate, - .round_rate =3D mtk_hdmi_pll_round_rate, + .determine_rate =3D mtk_hdmi_pll_determine_rate, .recalc_rate =3D mtk_hdmi_pll_recalc_rate, }; =20 --=20 2.50.1 From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 07BC72D839A for ; Sun, 10 Aug 2025 22:46:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865998; cv=none; b=GRejtKLYORsamCv7LNhkHljBVRfS1UsK3bWOqfBjhyNB736/YbQqfCSUzveJVLgDQBKg/+4oDkJuz695MfXtCJo+2ujaglZ5PZBYfRyO4aRBjxM6xqk38p2jVQidAVsyfx0nJDKS3+AafQDAwupp7kQy4ZohjlpQMcabdX7Sums= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754865998; c=relaxed/simple; bh=x3H+bi72Ud0O2ADBCQwtbhpk+18O8IQnZUeD4zYXytc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jqJ1CsDjIJ2K8iKYETKf6kwqBKWA4HSccw74kP/aXZ2jAQSC+JNIlsoFzoI6/NcgL1fMHO6pdD1DrlSebTUTK71pcUiMWYtqVv1wZlQBfLDsKytEL5CADkGLT5Yqb0vUATUbWVCP4OqZhOkNF+omRa8bYfhEhKAX/UGVl3hMKFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=iFp6fqVy; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iFp6fqVy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754865994; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sw1cLvgEhua8i3WpG4C9LAPsxagtK2jeoB8fPKEx0SE=; b=iFp6fqVyLh3jXZVxthCwW3aHywYWAyBEAgMSRUjXLVaL9l8S2a8v8cfrVngK+TAqWHvp9a noabNTutbDJxP/5XBmd9e4HHM6thN2XezgdDLNf3L51S02pTkavq1a+h2t68OGnrC2q/j4 NPIdp6l+CJWJ6Qm8lavEdp8N6WNbu8Y= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-617-KH473wCYOCiTavyAN7Fwzw-1; Sun, 10 Aug 2025 18:46:33 -0400 X-MC-Unique: KH473wCYOCiTavyAN7Fwzw-1 X-Mimecast-MFC-AGG-ID: KH473wCYOCiTavyAN7Fwzw_1754865993 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4b081d742d9so149093691cf.2 for ; Sun, 10 Aug 2025 15:46:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754865993; x=1755470793; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sw1cLvgEhua8i3WpG4C9LAPsxagtK2jeoB8fPKEx0SE=; b=RhbIUPmI6gfMgTmGrZ4c9aLQ+SvOwnK7wI0VDf5WTaKSA9/SoYqTYhnqA3c0YrXyWZ 7mSKrWjp5+oP3FZ4itlWWcaSyYK4pWeHCcXqbVzICRgv8Qsh/x58+BRobNUVC+2peI7q +WA6ddiSyG4vKI5jEWEV+oBf3LuGAMv9hlRPIAb7dGBTAdKGdw9F4NcKoUy8CrVYbsdR rKnPcwIMVpI26ahsd7x7wuGAZess5i47OLWH4G8fYOUg3zxPnFwLQ3HgXvBLqzV6CQkF QSkXv5tKzggVMLJWgZaTWNDBQq4OaWJArKvt3KmEg97E/VjTPqk43yi1ApQv8QhrCcCf V+Ag== X-Forwarded-Encrypted: i=1; AJvYcCXa0+S+cwe9L9ZTgMJtprECmhL8j5NXIh3CPYQrflvzQf7L5LcQEPtaFKDX+Jqh7RF4opTc3EnzD2dDgRk=@vger.kernel.org X-Gm-Message-State: AOJu0YzYmZRikSxOjuoZB4SYSzmt2rraIUwI4vzvDBHoLKB1EmS8w9Mu XOAOWr87IeSDvpVduKHMo6v1kj04eCSKwgXWU0P/bbei7avh1tNrcdLtrwb3kzOGJB3/q4DyPmc xSE9olg0w38VWnRUj4LtZOpdcj2pfJGNp/eMDzwFLEBmBut3jvyMm1ZV2jJmeHHJatA== X-Gm-Gg: ASbGncseZmV3KLryGZBO/hPOB+z/GMxadfe40SowVoARawPkwqB5aBYX4bRWEi7phMg dsS5auyxJgqADN6FQxo/CfskDPfsyLPz0hMfxvoIVie6rZeS2f+j1GtrLGGZZd3ACLzSNF/ttlC TQs4kQye5jGWbfa15yTSWvViaPKSn2Y/42e63TcaXDxWj8ZZoyqQLNBXS7wtPwY02UoSOiDZ71H MWg3v0g2RpAesnqKZSVkJVXguiwwdHuvBCJ7D7hI/Lj/VIqGe3BqiM5aO4cQVX89IJVZNCjkZZj Dp76s2XSoEy1rPKauhCZ/wuuDfnxdK2UqQWF5onoXSeQ4VBKClTnUlMQq1eFhmL4UdDsSX5oZP/ RL+ajEA== X-Received: by 2002:a05:622a:2b08:b0:4af:1fb2:339b with SMTP id d75a77b69052e-4b0aee5ae32mr145137571cf.59.1754865992938; Sun, 10 Aug 2025 15:46:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3TxaNlOm6CWR20thRFc4k1fydx3ZMYAWuNcAfSFTfYY5caqw80RA7wi77MbUh3gKnqnfd0A== X-Received: by 2002:a05:622a:2b08:b0:4af:1fb2:339b with SMTP id d75a77b69052e-4b0aee5ae32mr145137151cf.59.1754865992498; Sun, 10 Aug 2025 15:46:32 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:46:31 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:33 -0400 Subject: [PATCH v2 5/9] phy: mediatek: phy-mtk-mipi-dsi-mt8173: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-5-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865940; l=1519; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=x3H+bi72Ud0O2ADBCQwtbhpk+18O8IQnZUeD4zYXytc=; b=Ko6nm+pXyNo8X1nQDJr+lVHcu4cXjZr/njvgKDiWI9hUw5g4z0iGWyficBfc/rHylfr1bFBC5 OcjcwnYNCZzC9mq0m1MLk4fjF5rjaP4zt/gCvk1nnxylsB0GMKTpJxJ X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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 --- drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c b/drivers/phy/m= ediatek/phy-mtk-mipi-dsi-mt8173.c index 673cb0f08959e0e4f2b1ade2ebaf796e8b76f8bc..438ff3605d90121b7bfe02b3ddc= a8194437ed9ba 100644 --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c @@ -237,16 +237,18 @@ static void mtk_mipi_tx_pll_unprepare(struct clk_hw *= hw) mtk_phy_clear_bits(base + MIPITX_DSI_PLL_CON0, RG_DSI_MPPLL_DIV_MSK); } =20 -static long mtk_mipi_tx_pll_round_rate(struct clk_hw *hw, unsigned long ra= te, - unsigned long *prate) +static int mtk_mipi_tx_pll_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { - return clamp_val(rate, 50000000, 1250000000); + req->rate =3D clamp_val(req->rate, 50000000, 1250000000); + + return 0; } =20 static const struct clk_ops mtk_mipi_tx_pll_ops =3D { .prepare =3D mtk_mipi_tx_pll_prepare, .unprepare =3D mtk_mipi_tx_pll_unprepare, - .round_rate =3D mtk_mipi_tx_pll_round_rate, + .determine_rate =3D mtk_mipi_tx_pll_determine_rate, .set_rate =3D mtk_mipi_tx_pll_set_rate, .recalc_rate =3D mtk_mipi_tx_pll_recalc_rate, }; --=20 2.50.1 From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 A14352D8376 for ; Sun, 10 Aug 2025 22:46:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754866007; cv=none; b=mnyhtRTF0IGfO+WjFszo91L/BxKT1geymvq51XXzHhCeAcA0K36Fl1l2pyYV//iGiaUlcsj75mv+B7up3cEtp9GS59mCOw/5eXWRsmh0SKzhNEHlvtqsNsfWNrvzF4v5S/mZt3J+yGfpV3oDDdSOmphRFs9/6CcrEXhXJcAxTFE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754866007; c=relaxed/simple; bh=tcM4xXKkkn7MFiutyaRVfeJ/7drFohogN+jyo8wqt4g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OxTTVSvEzTqKi8ojWXL8Ql3PQ9SRi2GaO1zG0SUf8sY1mazy6lGyO8DEJbksnIuF7VGrctSwjTri9yiFc2t/WjvJTM8Sd1+pV/XBIqsWUHBLXG36t835GZv4aktoBPCdLgv9gj5+Gm+xFnudg4AkxaX6BUtjrCRVF+voMwcVPwM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GCNb9DtD; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GCNb9DtD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754866004; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hq8kcIcUVamqXRpaO0muDR92j7XbTu3OW8hMLpghTgI=; b=GCNb9DtDQZEZiZxY11qWu8YIJIJVxhzI8urWBMzeoHU3oxDp0c7PR/qIPodhu/KFSPg3hy Xo8Rgq5NyKjnfMTfP2yLe8FRK7tN8ySZElun6Zq1jIr9fu5HT9y+2bRSN1eczOZLm/8ZZC 80uK1UwIyEMJuFX19J8eYiYW+yBjFqY= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-lmJucguuMiydqcV6JMN1NQ-1; Sun, 10 Aug 2025 18:46:43 -0400 X-MC-Unique: lmJucguuMiydqcV6JMN1NQ-1 X-Mimecast-MFC-AGG-ID: lmJucguuMiydqcV6JMN1NQ_1754866003 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7e6a5428a76so1248714185a.1 for ; Sun, 10 Aug 2025 15:46:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754866003; x=1755470803; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hq8kcIcUVamqXRpaO0muDR92j7XbTu3OW8hMLpghTgI=; b=kfUxzyJTzEN3lFbZZkDYi3XWKQOWgqFw9ar/1UT1Envp/VwHqAe/g3UwdNTDtewNMN zEYDqSFr5TWIbaEu+19EdKIlbA3rOzbotrT2eVAzkqLJaXQvKM0dtiuYSbkP65UnCvzl fEegdOm2rU+iA7loiMcbShZBVwgkVI2uxBGiit7rGMzFGDyCvbMmYUB3vmvug+5A9kZR f5J3wPIqTGHJ+ukD6eZo9hnh6csZS/Id4tleWbKULgrYxB1Ucg6eL7olHGfP2KBucNXz K30+GcSrkgWskTE6aKFDj2VNcS+HRsedCKvfqsQhEp9QifRzPcC+34prkh/c/5tfwkhU YzAw== X-Forwarded-Encrypted: i=1; AJvYcCV422nofSp0uc7lysAlNImEtC2xOLT/pEMVkn04t747YKb9RUWg/EwFVz4DFdsPoy4mrLIEFlibUO5HewU=@vger.kernel.org X-Gm-Message-State: AOJu0Yzd58vvPCYfKT2ylT8wvxgMkXePXBUjEKl7B1feNNJfdwLFGhY/ GcOhhqHvYRSQQJenlK8DC4utdiGtH56vaxSmqTTIgCFRYlEb0hJt8YjgxUHtM9HIJehQrWiCdtP Z+aO+BocpGbF6NzI1/EOtxyxeTjK9e06ptI9cO+GLZoZQcljD6e3Rp7toKhUnjcbOyg== X-Gm-Gg: ASbGncuCaB8Wfijc+uMnY90R8iacmb7oGwTTQLNBO2yXp7h3QaLTndhp8QPYA3ZutMm nz0+lWgIGoREnG7wKScpn3NP46m7WeBrmNfKwX47JzYUyTOWScS8AvaETH2yqcH41CS+OcfXAf9 dBzbgdUdU5WSOdLP10GHDWe2tim1WSHfOFJKtP7DrYh3xUHgz5oTu2kgAROe2B0a+mZX5NuO736 VeBIK53jd8c/HHyE/DsmMwfxYKJkd4eaqdEl75BB0ZIl0ZwFwBwdCS0/6JIMVRjTValnVUb31H/ OTtLAKfJN1Fzb3SwGyb8JZxyG6IP3TLtr4WDD0jxbo4ColGj9YBOivlyA0wja7PcbC8fTgU79DD ari6GXg== X-Received: by 2002:a05:622a:1487:b0:4ab:622b:fffb with SMTP id d75a77b69052e-4b0a06eec4emr195091111cf.5.1754866002600; Sun, 10 Aug 2025 15:46:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFh5lS/n97PBNJSxOrFycNhagzbIhlgW9qQ3w8XV40W5m4XhN8ds0cjQ0NNa80CSmcd6Go3LA== X-Received: by 2002:a05:622a:1487:b0:4ab:622b:fffb with SMTP id d75a77b69052e-4b0a06eec4emr195090871cf.5.1754866002209; Sun, 10 Aug 2025 15:46:42 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:46:41 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:34 -0400 Subject: [PATCH v2 6/9] phy: mediatek: phy-mtk-mipi-dsi-mt8183: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-6-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865940; l=1507; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=tcM4xXKkkn7MFiutyaRVfeJ/7drFohogN+jyo8wqt4g=; b=q0MF517SEn6EZmLxnbXxB6XM3YYpy8tWmSgApsuH3irA3Q16tHw+AsuYoggeySatst9jw32Il A73zaG5FOWFDy/zGALRujdwgvPQdV6YkqHRZBcR/ePkMLWkrWepZFcj X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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 --- drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c b/drivers/phy/m= ediatek/phy-mtk-mipi-dsi-mt8183.c index 553725e1269c9d7ad88f89367dfa1cf367aaf1ce..a54d44ef70ab49937d210f04fdf= 42300e8e5f2de 100644 --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c @@ -97,16 +97,18 @@ static void mtk_mipi_tx_pll_disable(struct clk_hw *hw) mtk_phy_clear_bits(base + MIPITX_PLL_PWR, AD_DSI_PLL_SDM_PWR_ON); } =20 -static long mtk_mipi_tx_pll_round_rate(struct clk_hw *hw, unsigned long ra= te, - unsigned long *prate) +static int mtk_mipi_tx_pll_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { - return clamp_val(rate, 125000000, 1600000000); + req->rate =3D clamp_val(req->rate, 125000000, 1600000000); + + return 0; } =20 static const struct clk_ops mtk_mipi_tx_pll_ops =3D { .enable =3D mtk_mipi_tx_pll_enable, .disable =3D mtk_mipi_tx_pll_disable, - .round_rate =3D mtk_mipi_tx_pll_round_rate, + .determine_rate =3D mtk_mipi_tx_pll_determine_rate, .set_rate =3D mtk_mipi_tx_pll_set_rate, .recalc_rate =3D mtk_mipi_tx_pll_recalc_rate, }; --=20 2.50.1 From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 43DF8EEDE for ; Sun, 10 Aug 2025 22:46:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754866018; cv=none; b=prjHPBeasdz0aVw64+UfXpHOgMNh54fBFQ7owboWytS86qzZrUGB9Zembjsa3j07f3uleXI9Opiczk2i+tndQoZMw4YWKqYx0rx4ErRl8cRSb0Mu38uePDqO5KHLRoUSy5wQU9OdNl+2Rs5bIpvrlhPXGrpwvVR5gJ77nOhB1y0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754866018; c=relaxed/simple; bh=cKQDgyjW9ziRVEOEeZhANbLz60Yx7I/xu3+zURpXhB8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uyzkYbkCozrQDR88IPHR089oxAn7R21ePjq3MsjzRqLsD9j2kdlnuFqSbW6+rPb1AVAZYV/yjng0ykG5Eor1kiXqZOBM7ENjmBrPoM8cetapKsioKLZ6jADjOuOpMUpajXMesbfHTPuCw8SJmIjillbNnO6qnrSGZMlgSZ00AWY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=f04WMM+x; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="f04WMM+x" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754866016; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cNnDUdz3gK4q6slcX3XODNycmDK0nBwCY+DO25+Es8I=; b=f04WMM+xYpDpsrbEl2lQ03+ovETDsHkmyGrqRm/ItuCDwHCE0FXIAl4K9tpSdFZhX2X8aq O0QC4lkN7z6ZYhMGILx5EA+30S1DO5dOznYA0yw0cNKm6FT70ShykkUuOV4fA8ZuyJQPuH y0y2zWDOKISkeK1BXo4s2Bsp89dslnQ= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-259-EPivVa3KMvKZg3XvX7rsHw-1; Sun, 10 Aug 2025 18:46:54 -0400 X-MC-Unique: EPivVa3KMvKZg3XvX7rsHw-1 X-Mimecast-MFC-AGG-ID: EPivVa3KMvKZg3XvX7rsHw_1754866013 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-4b096d8fc3bso98115051cf.2 for ; Sun, 10 Aug 2025 15:46:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754866013; x=1755470813; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cNnDUdz3gK4q6slcX3XODNycmDK0nBwCY+DO25+Es8I=; b=CNwYDn4jGqDiuoE1BuAHV+XSTcTjHpTgxOlgHW8ZpIBJ1OIiKNwhEW7V2Xj4fxR7Oh Ct4qOaNExQARWTLjBtDfDjOI0HNMp4mAcZRjdtd369nMPDECcXiMbwZIogx1PpNgARB/ FUNOJxcVnWnEayGtIH9/bb6B1rMo4T1FIKALYnhiIfFr1r8mdUJpIJzo/5O9E1SnaDxD f5BrdHHgZmVHedOq/MwnrwFYln98oHtr+Pj4GKwu67Je/DuN1NeCsBlM8o71ckKdsQsA Y2ADJncquYqNjJ448ql+TUQ7Cv6pfaiWjDxiFp5TPSDzowYP1YSPIMBk4DeNgnFDijaT uZ8w== X-Forwarded-Encrypted: i=1; AJvYcCWkWUhrzSUIERZAM4yzSegItm7SL849AjSNz5uKVmIzVaLpdZA0pITlx4zE8NuFYBd76PKrtVNJYocdY8A=@vger.kernel.org X-Gm-Message-State: AOJu0YwZhGwTFCmftT0pJW38NjKeQXf5a+b6SHn1H+d0CQWa8+78j0ua Ul5DBw8EZaZa5iVDnzl3VPfl60B7jUkIyRNWuzVJoAWzODuzH0C8T3eDhc5gXfmwe6IMkfvysRy JW+MuWmGlgXn8L6CnsOlOEFNWrbmb+4PTghuv4PFdvJLcCzk4ddYKtDvak1AvT/RoyQ== X-Gm-Gg: ASbGncutWcstrpYdsbg4pBRTVK+PnT70J3PXfPIsywabI1Zv1aFq1ZjLl0zOL08W55Q gS5gRzZKC0zhRS+vVDk3Hv1VLYFzgxfMPlqehKJ43JfYlm2M1YnYVdz7oATVHE6Tja3gwsm4Vk4 TFWVQdMi5uzGGtXF+hfEHKUVNYyJg2RQVWPguwZLIf9dXmSgf30YmgvtGV3pqqy6uqG8kQ8v8l+ SCP9Spu8PSnjNHGbFnSDayD2h7ljEZLgUFB7ELYYFkA3y1ICPD/rPWsQg/VR+ZwOWw+TwB3XROr RThP7/xRzvRNLvDlVRcOnYfGH88fWN3z9iFgEVC88/63hBMijKuBLYifr8PONaLaEZ11MRCx0Sy su9K5UA== X-Received: by 2002:a05:622a:4c06:b0:4b0:9c0c:f62c with SMTP id d75a77b69052e-4b0aedd616emr157202911cf.31.1754866013422; Sun, 10 Aug 2025 15:46:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHzBkZptPsYAU3FTRK+ndIewqVNVtwKayuUxmee7QLaZcahzXf2pV/ZFq3ye47SvzpbuHnnjg== X-Received: by 2002:a05:622a:4c06:b0:4b0:9c0c:f62c with SMTP id d75a77b69052e-4b0aedd616emr157202631cf.31.1754866013021; Sun, 10 Aug 2025 15:46:53 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:46:51 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:35 -0400 Subject: [PATCH v2 7/9] phy: rockchip: phy-rockchip-inno-hdmi: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-7-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865940; l=3209; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=cKQDgyjW9ziRVEOEeZhANbLz60Yx7I/xu3+zURpXhB8=; b=ubxW3dDssQ9yAkb8tdXuvrTvn/pHg2yvGTU+fNLDZ2kHxtV9S6BpsFJwTSIz6e+KtTNUexPkp SQMN9QW7undDFAjxcu/0ARBSNmYy90wYl7KSLg0AAAuddMqm2btJcAi X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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 --- drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 30 ++++++++++++++---------= ---- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/ro= ckchip/phy-rockchip-inno-hdmi.c index 8dcc2bb777b5455d21a10f06c5ad842b2ddbc834..1483907413faa5ce1dc8614db05= e6e929410404d 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c @@ -749,22 +749,23 @@ unsigned long inno_hdmi_phy_rk3228_clk_recalc_rate(st= ruct clk_hw *hw, return vco; } =20 -static long inno_hdmi_phy_rk3228_clk_round_rate(struct clk_hw *hw, - unsigned long rate, - unsigned long *parent_rate) +static int inno_hdmi_phy_rk3228_clk_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { const struct pre_pll_config *cfg =3D pre_pll_cfg_table; =20 - rate =3D (rate / 1000) * 1000; + req->rate =3D (req->rate / 1000) * 1000; =20 for (; cfg->pixclock !=3D 0; cfg++) - if (cfg->pixclock =3D=3D rate && !cfg->fracdiv) + if (cfg->pixclock =3D=3D req->rate && !cfg->fracdiv) break; =20 if (cfg->pixclock =3D=3D 0) return -EINVAL; =20 - return cfg->pixclock; + req->rate =3D cfg->pixclock; + + return 0; } =20 static int inno_hdmi_phy_rk3228_clk_set_rate(struct clk_hw *hw, @@ -835,7 +836,7 @@ static const struct clk_ops inno_hdmi_phy_rk3228_clk_op= s =3D { .unprepare =3D inno_hdmi_phy_rk3228_clk_unprepare, .is_prepared =3D inno_hdmi_phy_rk3228_clk_is_prepared, .recalc_rate =3D inno_hdmi_phy_rk3228_clk_recalc_rate, - .round_rate =3D inno_hdmi_phy_rk3228_clk_round_rate, + .determine_rate =3D inno_hdmi_phy_rk3228_clk_determine_rate, .set_rate =3D inno_hdmi_phy_rk3228_clk_set_rate, }; =20 @@ -906,22 +907,23 @@ unsigned long inno_hdmi_phy_rk3328_clk_recalc_rate(st= ruct clk_hw *hw, return inno->pixclock; } =20 -static long inno_hdmi_phy_rk3328_clk_round_rate(struct clk_hw *hw, - unsigned long rate, - unsigned long *parent_rate) +static int inno_hdmi_phy_rk3328_clk_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { const struct pre_pll_config *cfg =3D pre_pll_cfg_table; =20 - rate =3D (rate / 1000) * 1000; + req->rate =3D (req->rate / 1000) * 1000; =20 for (; cfg->pixclock !=3D 0; cfg++) - if (cfg->pixclock =3D=3D rate) + if (cfg->pixclock =3D=3D req->rate) break; =20 if (cfg->pixclock =3D=3D 0) return -EINVAL; =20 - return cfg->pixclock; + req->rate =3D cfg->pixclock; + + return 0; } =20 static int inno_hdmi_phy_rk3328_clk_set_rate(struct clk_hw *hw, @@ -989,7 +991,7 @@ static const struct clk_ops inno_hdmi_phy_rk3328_clk_op= s =3D { .unprepare =3D inno_hdmi_phy_rk3328_clk_unprepare, .is_prepared =3D inno_hdmi_phy_rk3328_clk_is_prepared, .recalc_rate =3D inno_hdmi_phy_rk3328_clk_recalc_rate, - .round_rate =3D inno_hdmi_phy_rk3328_clk_round_rate, + .determine_rate =3D inno_hdmi_phy_rk3328_clk_determine_rate, .set_rate =3D inno_hdmi_phy_rk3328_clk_set_rate, }; =20 --=20 2.50.1 From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 305392D3218 for ; Sun, 10 Aug 2025 22:47:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754866031; cv=none; b=lX4QCAk9HSKOHAmDmN5cBBdp+zfNP7oh73VIFRhERhxRxQaAtdAydXXVXI3E6/WDvfWBGq/+BIlT6LAi/RAOkrkk+ByWkg+GArGs+Q2fngr+EXJP9oz/7Smckq3nBnZ56MLYYSogR6QzHDsOLQVhYkTCq7pMUuIWadBkQI1omIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754866031; c=relaxed/simple; bh=ndDF7+BW9z3oZgdFS9E606ToKp/Oxm2MLZrOcNPZM6U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NybBXyFQlfyhVLyuBd2uF36R6nsOcb0PKzoe5AMQut5nobmrcNdzWUh8ar8v0J7JENFlQtQDctvqKAFQZP1aef8HIopoaCpjMUkIMB53GvdStMD6UBxjEy40r4ELKaaNrV6A6OAm+uFhSo7pqiwma5OzMUX3bHqjqnKMOoAOnkU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=EhcIpGTl; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EhcIpGTl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754866029; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sMcTNy0e5RVfi5VVz1vP+dp2IXm5jO1AgXXTZDV98Gs=; b=EhcIpGTljjgHb/xxiBi6ocFnMvaAg46U9SK7yEDf9/t66p44cRPAUKjieIarXlbe6BIRis 3mZ2BWNI01wCFSbGiAlpsFBjQlDlAjemL5yigdXQCayXm30wJMJFXgHl80xOFDwzDxnxL1 UYCjROETwWjuocWv71cUYIel/Lcc6/I= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-583-PinzZvUjPN-G3ilNKZzGvA-1; Sun, 10 Aug 2025 18:47:07 -0400 X-MC-Unique: PinzZvUjPN-G3ilNKZzGvA-1 X-Mimecast-MFC-AGG-ID: PinzZvUjPN-G3ilNKZzGvA_1754866027 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4af18aa7af8so106702561cf.3 for ; Sun, 10 Aug 2025 15:47:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754866027; x=1755470827; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sMcTNy0e5RVfi5VVz1vP+dp2IXm5jO1AgXXTZDV98Gs=; b=AZHZ+sIjBiwA8PchlZvyrdQJb/eMpUhGAAJwkl+u6cCn+Q26JkMl9thbohkK0xHS4T cCQcieJGt+u5kU29whxAP819I0hRHuZjbykr5FmJqrvbkhrVY97AIcH5KBkC6PnLH0Zr Xy5+8VZXqA+jrdqnNTSN9TZMxDWk7YCcDZa7fZRrh2Y62LT5pd/eNWCUPI3nfE7hD1gJ BT/2uxxqoVqHMxhTp/eV0lineWMLoLGbjQSWzisil3WBzhmgIzPsBszC5Vh/y8exxlgi HQ32+EuZ8EQ+FGXxy/K5HNeWLG3E+/8TM4+VnPQuFDMYHnqtffTtSGcZcrXX2GocZ8xj AsMw== X-Forwarded-Encrypted: i=1; AJvYcCVjBJ7vqAp2onwzf4pL2QlIrINJXC4ofYJCU1AlEnYEe2wCBsi5Ia6DcYGm6oA1ZTWkJLk/d3RV1l5yqFA=@vger.kernel.org X-Gm-Message-State: AOJu0YzKvd34ru1LfY4EDsZgVdSL4171G1c1S1ghu9xylThl9ZR5DV/6 T34drCbAGEcp3EjnNKB+Yr10X4grs8vJ4uNR/YPvID5CcM6+RjhCK0dlWGxur18qdqVt/WjdQ5t B95U+pjrfvB73YQk3Hy7dz1NmzfRl3EYxHEbaBLZzkCM1I+qpnu8muCLaYj+04SuFiQ== X-Gm-Gg: ASbGncvh3dq7fW1AW2XGqamqW14SfIslbgw6v69yHBZqw8MfIvUhxhq7m87Z+HDo1Js 9IiXQx6TDtgUhtXvtkn4ITTOr4pPgwb+mnLco3tLlG97EQjAFU/oo/t/gNjgIp6WOmANLVeHgxv EhU4WUg/1KX8WT2/XXMmZGf3Shx3rRq6L3JaLCCAVYqhqr5p7tm8OTxOsLErPVTbPN1Y5p0qvBd njLNRkkkX4cscnsIUeqNMYRoX0/v/9QV3Lj0WBomR+n4XphA/8srO7Q5pn2YeC2HowKDHSq7/fc 0L5WaAv4y65IPIxwdcJSvOj2Q/wqDqHwwZYkFZM7PTsImjcwaT437iqyCVAtM07xSY8VrzChUDp dXlM4PA== X-Received: by 2002:ac8:5fc6:0:b0:4af:2139:7721 with SMTP id d75a77b69052e-4b0aed6a5f7mr163617601cf.51.1754866027083; Sun, 10 Aug 2025 15:47:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHP5IJU8z9koSl05icwsQuLC7xmNyQP3PO70C+KlxY+wzOdhzlnvRlzStjW1m9tN2vsBSQZA== X-Received: by 2002:ac8:5fc6:0:b0:4af:2139:7721 with SMTP id d75a77b69052e-4b0aed6a5f7mr163617431cf.51.1754866026637; Sun, 10 Aug 2025 15:47:06 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:47:05 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:36 -0400 Subject: [PATCH v2 8/9] phy: rockchip: phy-rockchip-samsung-hdptx: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-8-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865940; l=2424; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=ndDF7+BW9z3oZgdFS9E606ToKp/Oxm2MLZrOcNPZM6U=; b=pM8GpM7PgNX1YsF24F8XlkiAdBklsmNw8Y01AAorZPrlImrF+x3wsR7deHwg6cBB+ANx46J6N A3zeH3x5Hu0ChDcu4CSeqRjFPm8eSd0GERqlUeKO53YvLSfbTdxsOMF X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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: Cristian Ciocaltea --- drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/ph= y/rockchip/phy-rockchip-samsung-hdptx.c index 79db57ee90d1487b51f4ddadde870a275dd7b17b..0d4e578c8c6a08aad355aa8aa5a= 1cf75c7d354ed 100644 --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c @@ -1869,8 +1869,8 @@ static unsigned long rk_hdptx_phy_clk_recalc_rate(str= uct clk_hw *hw, return hdptx->hw_rate; } =20 -static long rk_hdptx_phy_clk_round_rate(struct clk_hw *hw, unsigned long r= ate, - unsigned long *parent_rate) +static int rk_hdptx_phy_clk_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct rk_hdptx_phy *hdptx =3D to_rk_hdptx_phy(hw); =20 @@ -1879,9 +1879,9 @@ static long rk_hdptx_phy_clk_round_rate(struct clk_hw= *hw, unsigned long rate, * To be dropped as soon as the RK DW HDMI QP bridge driver * switches to make use of phy_configure(). */ - if (!hdptx->restrict_rate_change && rate !=3D hdptx->hdmi_cfg.tmds_char_r= ate) { + if (!hdptx->restrict_rate_change && req->rate !=3D hdptx->hdmi_cfg.tmds_c= har_rate) { struct phy_configure_opts_hdmi hdmi =3D { - .tmds_char_rate =3D rate, + .tmds_char_rate =3D req->rate, }; int ret =3D rk_hdptx_phy_verify_hdmi_config(hdptx, &hdmi); =20 @@ -1896,7 +1896,9 @@ static long rk_hdptx_phy_clk_round_rate(struct clk_hw= *hw, unsigned long rate, * hence ensure rk_hdptx_phy_clk_set_rate() won't be invoked with * a different rate argument. */ - return hdptx->hdmi_cfg.tmds_char_rate; + req->rate =3D hdptx->hdmi_cfg.tmds_char_rate; + + return 0; } =20 static int rk_hdptx_phy_clk_set_rate(struct clk_hw *hw, unsigned long rate, @@ -1925,7 +1927,7 @@ static const struct clk_ops hdptx_phy_clk_ops =3D { .prepare =3D rk_hdptx_phy_clk_prepare, .unprepare =3D rk_hdptx_phy_clk_unprepare, .recalc_rate =3D rk_hdptx_phy_clk_recalc_rate, - .round_rate =3D rk_hdptx_phy_clk_round_rate, + .determine_rate =3D rk_hdptx_phy_clk_determine_rate, .set_rate =3D rk_hdptx_phy_clk_set_rate, }; =20 --=20 2.50.1 From nobody Sun Oct 5 03:38:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 E29FCC120 for ; Sun, 10 Aug 2025 22:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754866040; cv=none; b=uQ8Yt6Yd25rxtIfH9mzAZRKd4PY+ZNOZmCuhx2isS1bBHCAPlSphrJsY3O0aXANfwScLPgUIE8CKQDqEdhpZBqVqqzC2fmF7mmm8X+VFO3/JP/kkXClUnNI9eDlaUcSUHzUzCiIc0wTUXxWVXgmhLYmkpFggitpsKnkClZU/6H8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754866040; c=relaxed/simple; bh=PfVBnMEhY+1VXjQch+u5PcV+HyG2IR2115kG2w+VUSA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MTRsOFvA3JbCNG2ypIEvaZ0DPmd6gT115LeI2BSk33+RCw0NVKXO5gUvQ7xDeO+mH/i6ngOaRixrGoNBsELhM/TZHKxqPatzOnZ7HYf3v8mz9kYcT4JjN8SqouEl/wfpGkWMhwBFP9VHFh480Q9aaFvLd6NdbWCV9Vc7ag4WXL0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ErIdCpN5; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ErIdCpN5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754866036; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9LIwrTzSIdW4XyPecxETwMmYAEX2pSsme7PIKfMfdJI=; b=ErIdCpN5woDuRf46WenRRCXh1cv7aMfEs2MmF9quTriNwLxYSELM/VC9LgLNH31U62TSKx DNB8qkHnQMFF5wgBQwLulWVzleFuj79tqNHM05oVirtP8WscEq43Zr0C/zrDAjCjx3V2b3 lc4zFad8hUt4LqAotJrLfdQIF8ovpvQ= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-NcNys-MkM8-bvZRd6tQ0tg-1; Sun, 10 Aug 2025 18:47:15 -0400 X-MC-Unique: NcNys-MkM8-bvZRd6tQ0tg-1 X-Mimecast-MFC-AGG-ID: NcNys-MkM8-bvZRd6tQ0tg_1754866035 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4af156a27b1so152290051cf.3 for ; Sun, 10 Aug 2025 15:47:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754866035; x=1755470835; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9LIwrTzSIdW4XyPecxETwMmYAEX2pSsme7PIKfMfdJI=; b=m9jxAVyL0FdYGaZSI0xTtXtsREcMzdgf0nFhJz/asIUqNMsNfotYNUN8l65+PL8VYb myRvN6oRgpy8655GagiZdM0qhhYWWY+4CsTqQHtK5F49345Xx43AN4N5v2NECIXdj7Kh bqZB5yWYi39ufTVa8Pv07YrvZ20djPhBOMuCbiiDXOfYN3BG1Wy7kKGseYMoMIg+M+tg qHJL1+zmsl3R2wrBMDB0GOh7yupQsg7Z73AXXPg/bzSrCaIpul7qHNM1dHBqwehuPOu/ nRk2c1gQ6BTkFm7D6Z92tVtn+pKt9Zth2oyYaVZYN53hC553EO6hKXksRchks+v75tpV 4qYg== X-Forwarded-Encrypted: i=1; AJvYcCVlPrrC4sAiZ80RyptFj4EzvN5YLeAX8Vn6YxNuFwSgwdVXOWU7Sc/GibnsdbuVv5dO225jZLt5d/48p7I=@vger.kernel.org X-Gm-Message-State: AOJu0YytuVmgU7ExzmDpUuq2/lIkW/2ZcuzzMxsaxDkuUKCXcwtpfTG3 bX2wort7dBsHanjnN4wCg+QjTA8Xp8UHO7TnBlKE2779O58RHV7E8F0hKIiYdfvE6b8xLzZ7LqN 19onkhNzogvgOKyhc7tvKZkY2GP3p+cfS57zXqF4zopMRxVV8Mj2Z81q6ZHf3Z1aH6A== X-Gm-Gg: ASbGncuv1CLMsgBXehn5SQTAiddEWmTgRmIvnfKHwIE8RYYSocIXEWMIzEnsFkzmC79 B7p8FoSS/aH7HkF8KwZmS4dAjJMyL30iBPVnkES5j1EOmSExOqLo0tmlfaWoB7g8xZuxY4v45b9 Wa5XvVSlMD2afvJkD1ogH+UUnX1hPSxRPrKOAMLn0+AH9y9Nw7jPxew/vmwa+uIW5UqdgWiSd32 OxkAQ8oW4MOyWZKmrPTA5lTK6bemvVubSQQ48UYMDZ68h9eBkxtDvsT0wHnQA2StmOTlQJL6gtr PSLXctOqElMqlKDKRVrOgz6Ubk+XMLyQYOMCv/1ygbb1VUReLUjXyJSmDHArkRLITt35Z8uQGCh WnsiP4g== X-Received: by 2002:a05:622a:400c:b0:4ae:cc29:829e with SMTP id d75a77b69052e-4b0aed983f4mr137421471cf.59.1754866035177; Sun, 10 Aug 2025 15:47:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEI4R4FgcBh6uwgYNS05a9B+ckO+bJARHrSqSCTHnGOa6vmcxR/BVXe8/wOen8M9+MhpG9xPw== X-Received: by 2002:a05:622a:400c:b0:4ae:cc29:829e with SMTP id d75a77b69052e-4b0aed983f4mr137421231cf.59.1754866034829; Sun, 10 Aug 2025 15:47:14 -0700 (PDT) Received: from [10.144.145.224] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b0ad996459sm42685171cf.46.2025.08.10.15.47.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 15:47:14 -0700 (PDT) From: Brian Masney Date: Sun, 10 Aug 2025 18:45:37 -0400 Subject: [PATCH v2 9/9] phy: ti: phy-j721e-wiz: convert from round_rate() to determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250810-phy-clk-round-rate-v2-9-9162470bb9f2@redhat.com> References: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> In-Reply-To: <20250810-phy-clk-round-rate-v2-0-9162470bb9f2@redhat.com> To: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754865941; l=1629; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=PfVBnMEhY+1VXjQch+u5PcV+HyG2IR2115kG2w+VUSA=; b=sL0ngpJvf7ih79HfcU+J6TF8fc534hLr/WKGFEbE4MP2Jf9cX1ovwrN2LEAg3nNaEFb5Q2o2o 4np7Je1hPi0C73RtTCBtGYON4LSvFYcTDMVZedGa2hpQZpsBbEsg5Fg X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= 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 --- drivers/phy/ti/phy-j721e-wiz.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index ab2a4f2c0a5bf3aa4b77045f4da8b0ddcc079f7a..12dafb2bd49bc33c13dd49246bc= 26df082e3dd40 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -934,12 +934,15 @@ static unsigned long wiz_clk_div_recalc_rate(struct c= lk_hw *hw, return divider_recalc_rate(hw, parent_rate, val, div->table, 0x0, 2); } =20 -static long wiz_clk_div_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *prate) +static int wiz_clk_div_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct wiz_clk_divider *div =3D to_wiz_clk_div(hw); =20 - return divider_round_rate(hw, rate, prate, div->table, 2, 0x0); + req->rate =3D divider_round_rate(hw, req->rate, &req->best_parent_rate, + div->table, 2, 0x0); + + return 0; } =20 static int wiz_clk_div_set_rate(struct clk_hw *hw, unsigned long rate, @@ -958,7 +961,7 @@ static int wiz_clk_div_set_rate(struct clk_hw *hw, unsi= gned long rate, =20 static const struct clk_ops wiz_clk_div_ops =3D { .recalc_rate =3D wiz_clk_div_recalc_rate, - .round_rate =3D wiz_clk_div_round_rate, + .determine_rate =3D wiz_clk_div_determine_rate, .set_rate =3D wiz_clk_div_set_rate, }; =20 --=20 2.50.1