From nobody Sun Oct 5 01:47:36 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 DDD6D2367CC for ; Mon, 11 Aug 2025 12:48:49 +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=1754916531; cv=none; b=EORNSXtbpBpL7Vt1+g9+n7NGy/ZL9c+OGwgKVIsEgBj52oF02o2h4jDfRlSwoTkPB9SAC2AmDuL6Q84l2E1h2cDefXAZVgJB5deHS9PbOwPZEV3a8n9lV1fvsSZUBlGmOmpdYa8YpqWfx+AH0/GymHYyiwDuNA3mt7WrySNZZu4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754916531; c=relaxed/simple; bh=l6XgJ6W7yha/WW016u8LdUqKQRLgIir6odjd16bnNlg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WtlTG03DrcAug0mZJXSn3q+p8yUchbcfBlVqYohVli0gspgkuehfhRNQWc63/q6dfgYm1do7jupYo5hBreBjQ3p6sw5bkbmrat+6kwF5/Pbjbs2AoqyEC5gQD5E8vV8Fbqxu/TEr7eIHUa93iX69kOhVlPwOUAIaSToq5SPUI+0= 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=Mai4RK6f; 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="Mai4RK6f" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754916528; 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=nEtISiukDB4UA/wwqndztsPEY9t1/gC9650XSLJtvzw=; b=Mai4RK6fSxtFRKB6I0iiewOn0+RhulAGlNDsDzRx4hpLX3tj+ec3i3RP7rceqetxLIYRnK bk09WhCKdlSbS9zfqiW2XqZR8ATI5XEIqo84G3GtXZzpQ2YcuCFcPKgr9c+K/2LPNA5++j Hiv+Y/ryXl4Gbtl0hToEEEOqAEFeRe8= 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-nCySupiHM7-tnqyR1WpfXA-1; Mon, 11 Aug 2025 08:48:47 -0400 X-MC-Unique: nCySupiHM7-tnqyR1WpfXA-1 X-Mimecast-MFC-AGG-ID: nCySupiHM7-tnqyR1WpfXA_1754916527 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-478f78ff9beso161903181cf.1 for ; Mon, 11 Aug 2025 05:48:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754916526; x=1755521326; 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=nEtISiukDB4UA/wwqndztsPEY9t1/gC9650XSLJtvzw=; b=Ad1pf9rXbAtTL7qd8HbNpsbl7eTKOiPSyYNheldN6OMCdM5GHQKiWd3P6aXG9rca1V djnOFEpdSoWa0aCyj4w6PacDSHJ18O0CfE+ZnwILQH/5HjdG/R28Iht3Qn9CTwc4tkSn He6v3hzvE8Wx42R97v+0d//ow4+G/OXPejO1yXcH9HG569eLIKArEKo5mczlx9d/D9c+ BDg0WkGxPC/8gjpLPnj8mn3eiSCVhdOX6DB5FdxPOyU8jqm7OAsRoFWiIdcBrb4UWOPz ypwzC6JyL1kMLzPTM16iGhyauLcwiyArFj2CQmgca8CbHCeTUNbNe6GMDXHcpJ5bs3oZ ZhrA== X-Forwarded-Encrypted: i=1; AJvYcCW3dGGBgDFu+kEPh4cPrF4JEmWTlTnGcmoinHEbe+unHsqAzpebwUUgXq+coYTpcNS4K9lakBbusisG9jk=@vger.kernel.org X-Gm-Message-State: AOJu0YwnlEL/pMgM85wTbaKw8KEDdkZp49mJmZkq41t85vcpihwjcXBq 2QuzawPCOjD4W+N+q3pInJBHbc4BYds8CJ+YY43NqTfvpjBL9LMvofMS2kIzhEvJpq88ECQqMv4 jzfsLz8TiQ2GRannUD5T1dUHUBGkZqa/90JXJHlU1rNMFN1Ckzok6yhGkEMXSBemGSHkebnqb6S Zv X-Gm-Gg: ASbGncvp7MsdNdKJH/WSb7NJA+caqYg/CDGWXduK4QucY0dxKe02bJ/H4kpF2CWqjDt 16KfEbYViTAJvAeqZTc3RG/o+jEspmoQQ9QrP/vNNadJGKAiTGGfEhVZ3dpf5U7yo8Vp9dxe3RN 47kOrbBx4T+v2DLANZuOhF7r6mNYe7UWxbZrrqTUgmAx15fs21iDL7O+iWz13pQnkAgCt1HnfYn kVdAVXPdLbDLaUGwOD7QhG+nBL28+1qjf7Ubq7y/s23dAIU6bVqmg6NbI62pkX22xbgP0YDlhvR 1YidtqkqKo7oaJOVz63vkYVHHkn5MAzj0uUvZP/mS0hYbZfRl7KdBBlHdHhkH+jnGzFqLoycSsj +XLo= X-Received: by 2002:ac8:7d46:0:b0:4b0:a07f:c1d0 with SMTP id d75a77b69052e-4b0aec61311mr154359091cf.5.1754916526287; Mon, 11 Aug 2025 05:48:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuajLdWHinQz1T8shERDjeevHqOrAQDwpblwaApX8japUOJDgE5x28sAgJW4p3Ei7BLjtm8Q== X-Received: by 2002:ac8:7d46:0:b0:4b0:a07f:c1d0 with SMTP id d75a77b69052e-4b0aec61311mr154358821cf.5.1754916525875; Mon, 11 Aug 2025 05:48:45 -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 d75a77b69052e-4aef746b6efsm138724001cf.15.2025.08.11.05.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Aug 2025 05:48:43 -0700 (PDT) From: Brian Masney Date: Mon, 11 Aug 2025 08:48:11 -0400 Subject: [PATCH 6/7] clk: ti: dra7-atl: 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-b4-clk-ti-round-rate-v1-6-cc0840594a49@redhat.com> References: <20250811-b4-clk-ti-round-rate-v1-0-cc0840594a49@redhat.com> In-Reply-To: <20250811-b4-clk-ti-round-rate-v1-0-cc0840594a49@redhat.com> To: Tero Kristo , Michael Turquette , Stephen Boyd , Maxime Ripard Cc: linux-omap@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754916502; l=1630; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=l6XgJ6W7yha/WW016u8LdUqKQRLgIir6odjd16bnNlg=; b=n2iLjG9nS7jOmK+UVJevc5Xa5r8KpCC7ggEeWCcVvPhhhsGoThO6dmi5mnXDQ7f0SjWodiNh7 OICvVHC6qGwCevKiZrShkiskzIyE+56+lWC/ZlUJVesZbHlGF3hDgyy 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/clk/ti/clk-dra7-atl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c index 0eab7f3e2eab9edb18a5f881ce329db1abdb5be0..b02f84d49b966ec0e14a4bf89e3= 9306048b964b6 100644 --- a/drivers/clk/ti/clk-dra7-atl.c +++ b/drivers/clk/ti/clk-dra7-atl.c @@ -120,16 +120,18 @@ static unsigned long atl_clk_recalc_rate(struct clk_h= w *hw, return parent_rate / cdesc->divider; } =20 -static long atl_clk_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int atl_clk_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { unsigned divider; =20 - divider =3D (*parent_rate + rate / 2) / rate; + divider =3D (req->best_parent_rate + req->rate / 2) / req->rate; if (divider > DRA7_ATL_DIVIDER_MASK + 1) divider =3D DRA7_ATL_DIVIDER_MASK + 1; =20 - return *parent_rate / divider; + req->rate =3D req->best_parent_rate / divider; + + return 0; } =20 static int atl_clk_set_rate(struct clk_hw *hw, unsigned long rate, @@ -156,7 +158,7 @@ static const struct clk_ops atl_clk_ops =3D { .disable =3D atl_clk_disable, .is_enabled =3D atl_clk_is_enabled, .recalc_rate =3D atl_clk_recalc_rate, - .round_rate =3D atl_clk_round_rate, + .determine_rate =3D atl_clk_determine_rate, .set_rate =3D atl_clk_set_rate, }; =20 --=20 2.50.1