From nobody Sun Oct 5 03:35:54 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 48C52277C83 for ; Mon, 11 Aug 2025 10:56:54 +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=1754909815; cv=none; b=R9JoJxhQL7fLpoMPOkOMM967DXIHoWxEvz3i3naUtv3oA8nT+4kJw29ZnGb2J/IVOuIycyS0pufCNJdoLACjXNMyf+pEG2AX+teYCfCVIbvWxQuqFhOtZxsleoECXb5JZKaNODlJRkYZLClkjywx8RF3m5kZelHb+5cDV7T9Vq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754909815; c=relaxed/simple; bh=4SmOn45QQwwyMezbBb5tx+ffOCKNsfDDe6H8Sa9QRwg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LhPbdkPx15lIuAj5WGv4Y1WC2Z6om4s0TU1wFZT7donOqieW899Scpr2CjuFdZcDQCKHAQPOWC2zvznNek8S2GUrabqWdskPYUJJMXzjmVM1U1Zvf6/JeLP62kz7mKKSGs1QQ6ekqQXeHN2BQ0Uf1crchrGOernRT6f24BR5pPo= 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=DdgK5j86; 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="DdgK5j86" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754909813; 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=t+Rztee25JuVOb3qnfGrbYzil++DqREMLNxo1mFDVeU=; b=DdgK5j86P6d00GitbptmK7sdrzwJWhHk495pOfAXuttPUG/Uu0Fe9b3Al5GIhEoaCoxEIM EHmK91B6O8ufFJtJY7zqfIAAGhiNDeV/LGhzU9srcNY0PrdG5iV/fioHD2f0nAHDWRqq4M wJVjksnkloQJx4MXmn/i6tj4crIyWDk= 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-645-U4mEPgWEPkah3eDj1Pypkw-1; Mon, 11 Aug 2025 06:56:52 -0400 X-MC-Unique: U4mEPgWEPkah3eDj1Pypkw-1 X-Mimecast-MFC-AGG-ID: U4mEPgWEPkah3eDj1Pypkw_1754909812 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7e7ffe84278so885973785a.2 for ; Mon, 11 Aug 2025 03:56:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754909812; x=1755514612; 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=t+Rztee25JuVOb3qnfGrbYzil++DqREMLNxo1mFDVeU=; b=K5mU8wjkMVe9DvXYM6Wps/WvAq38B7sYRyt2ZaU3XeyI/0UnNx7iTifO27U/se6Arz SdyVQVb0KjNbytrbDm1z4niSrvC0l/lLyScwK6o2OsH9sDYynMVcnLwzuaTradk661qx o6gjogYHjdwy9x8aSuUj9DlItzcku17T0SJ68NgdlmBcmVr23STQPgu7N2b1kPCXj28l oJpHogf1MmIbMvAcznWtoDwHnSrG9ujccgCBk0JkYHY8yxTH5MoicOpdbkpM682UIHZa eJj1yiANbu/QnL3437hdoz15y1IXM2Y+fAJVvvMCHGIwGWOe/sVAziGAqPfb6Dj08bQ0 dgzQ== X-Forwarded-Encrypted: i=1; AJvYcCWsubq5ZNb2YCkK2XR9N2GQwYTO2VBSKp8mUi8QziZ75hpOi9RCAHtR8ccWFbAYQyu+lzU6K6FunswIIII=@vger.kernel.org X-Gm-Message-State: AOJu0YxxOLhwEspveMTa07gqLGsld1sOm8EG7nwP/NJZjIqEGv/ZiUCM +qtjmsAikBd1qi1Ep5SHCjpzAIrCdP475aUXdYOfx243pyQdxn2RnxEPlMLH5XbFhd2IMA76XkD PweaUWkvj0reRgrGEwZ+RyI5RXa2itjodUXCMA3lhfSRsJPS0FLUvQ0ob/MhhoI6h3Q== X-Gm-Gg: ASbGncuW71jJISPj4Bd7GbyyKJyweK0qEoxOB8rhnDOeqTeW3YsjgtV0KEdmN+lu3EC SWz497UxMwm+goQmda2d4ZCW9/B2ZEzMl6QdTL2IcjaSShQYReTJ7/73Vch4UKb1et47gD434Dq aha0DkL8OCBbebQTCmpko+Rs6fwFW3HV8SZJjGxjoy/+EWjx1cM1V0VQtyBNWUtMPOuNeaFtNPD YeezE4miBb/HTu9mPpRqFThZSNdeb0WzfTxo0npHqpst41sn25ZyMBTeSbq7uP2TiLrJleB/I42 srdxkp1+Kd2tIj/g6z75IVPXTsCLA/Djr+x5os6xy4uw7P02V+uKGwTqN2ue22EzZIl0w5kr0rd AzgU= X-Received: by 2002:a05:620a:c50:b0:7e8:1b64:2187 with SMTP id af79cd13be357-7e82c75f958mr1792739985a.33.1754909811727; Mon, 11 Aug 2025 03:56:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEK2Etk94d7jqWBuBTsPUBpC0ORVIn7oE21Xh8O9EOQgSk7vq5RIMLYWuxIl1Nwz+nt1Y38MA== X-Received: by 2002:a05:620a:c50:b0:7e8:1b64:2187 with SMTP id af79cd13be357-7e82c75f958mr1792735585a.33.1754909811152; Mon, 11 Aug 2025 03:56:51 -0700 (PDT) Received: from [192.168.1.15] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7e698de2df7sm1273446485a.80.2025.08.11.03.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Aug 2025 03:56:50 -0700 (PDT) From: Brian Masney Date: Mon, 11 Aug 2025 06:56:12 -0400 Subject: [PATCH v2 8/9] drm/sun4i/sun4i_hdmi_ddc_clk: 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: <20250811-drm-clk-round-rate-v2-8-4a91ccf239cf@redhat.com> References: <20250811-drm-clk-round-rate-v2-0-4a91ccf239cf@redhat.com> In-Reply-To: <20250811-drm-clk-round-rate-v2-0-4a91ccf239cf@redhat.com> To: Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Linus Walleij , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , Yannick Fertre , Raphael Gallais-Pou , Philippe Cornu , Maxime Coquelin , Alexandre Torgue , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Stephen Boyd Cc: linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754909781; l=1693; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=4SmOn45QQwwyMezbBb5tx+ffOCKNsfDDe6H8Sa9QRwg=; b=D6lQv4uU9BbCtmlsDXvXPLa8dR0h0DlOWWckbVaEkFndxlEt+IyMNkfDuSVR8NgDYOThGx2MA 72BwKh/6cLNDsrNiAlNie395a35C4+/kjwVpt/wftlDiaqzAFDkxkOV 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. Acked-by: Maxime Ripard Signed-off-by: Brian Masney --- drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c b/drivers/gpu/drm/s= un4i/sun4i_hdmi_ddc_clk.c index 12430b9d4e930f7e7b0536a5cabdf788ba182176..b1beadb9bb59f8fffd23fd5f1a1= 75d7385cd5e06 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c @@ -59,13 +59,15 @@ static unsigned long sun4i_ddc_calc_divider(unsigned lo= ng rate, return best_rate; } =20 -static long sun4i_ddc_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *prate) +static int sun4i_ddc_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct sun4i_ddc *ddc =3D hw_to_ddc(hw); =20 - return sun4i_ddc_calc_divider(rate, *prate, ddc->pre_div, - ddc->m_offset, NULL, NULL); + req->rate =3D sun4i_ddc_calc_divider(req->rate, req->best_parent_rate, + ddc->pre_div, ddc->m_offset, NULL, NULL); + + return 0; } =20 static unsigned long sun4i_ddc_recalc_rate(struct clk_hw *hw, @@ -101,7 +103,7 @@ static int sun4i_ddc_set_rate(struct clk_hw *hw, unsign= ed long rate, =20 static const struct clk_ops sun4i_ddc_ops =3D { .recalc_rate =3D sun4i_ddc_recalc_rate, - .round_rate =3D sun4i_ddc_round_rate, + .determine_rate =3D sun4i_ddc_determine_rate, .set_rate =3D sun4i_ddc_set_rate, }; =20 --=20 2.50.1