From nobody Fri Oct 3 07:40:38 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 6BCBE225A23 for ; Wed, 3 Sep 2025 15:15:31 +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=1756912533; cv=none; b=MB6vePsdF/njyIHCES0/ouTi54pOoAMMYhWF1dopO2um/OBgb+6nd/49QX9/kDB9GIvBGiB9+2atNuQwXp+PtYsmw6OoA5FNPeQ0OYYGCt/FHHlic9GsEq92zmZfJ5wOLcectpWLWTQPH9T3RzYG/uBO7pHDPjv+8OhhuSwEHgg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756912533; c=relaxed/simple; bh=P/K1i7FofzljhrSueDv/pWynCeqTvU5xHXstL0F7owk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bduvbw/PcH4wTZRIusNEHeduqTnRc2W/2SL6K9Lld99DNRiTHV42upkp61yBFm1NHN5jauTYDHgweDDTFwKQpdqDO5gSMclMfY9uwh80Fwln6QcRnmMjFD3lOvKNDVVkgucGumSdaVzCZmXZp1qoGQzXtMcwSKHQW9SpjzycoYo= 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=aLpLEO/G; 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="aLpLEO/G" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756912530; 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=8cne1IA1KPb6ZTLi6iYFaT1l8FItUau4GOBy9fEXnFU=; b=aLpLEO/Gpm6n36oZOlZGrCssSH7k9ShawforViBXMJwTQETcIFb+QeVJBOOKYyFJrGeklL CUBSuEGjTNYzRljDwqDQN6wOcbOXsNcXIqHAbmE6/s/QAI3GSFJ0cgltiDbuWKhwgZDXUE KYyU7WT2Pm8kshQin0rffNStO5gEKGE= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-663-hd5bHrujNpidFmeLvay-nQ-1; Wed, 03 Sep 2025 11:15:29 -0400 X-MC-Unique: hd5bHrujNpidFmeLvay-nQ-1 X-Mimecast-MFC-AGG-ID: hd5bHrujNpidFmeLvay-nQ_1756912529 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-70fa9206690so17766906d6.0 for ; Wed, 03 Sep 2025 08:15:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756912529; x=1757517329; 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=8cne1IA1KPb6ZTLi6iYFaT1l8FItUau4GOBy9fEXnFU=; b=XaD4Beq/l7JyEZNSiBXNPYIJ1A6bzlfphq66P1OWDQOAPPJpoqlEVqz7heYi1JovFH bltqZwX5UgTKkprJIOOCn8AE+ISaXDD94FajgYfaTCQyecJRNFiaNrMogzdtSVDz5ynb kveXf2n5OeidvWlbthoSZAtFtuYh0FT7VSCiWkgvXbaNUPELkw4SrZlNgNnVRTtQXixs MUfq/0q2i6SMiI2c7GltAUihPWtIQqqNaNgztVhl5XTd2ric47koCpotDaCUtZk5ayuF GKlZQpt6wwrjX7gVmDyrjweBFiK/BWVY2+q5I8BJN04RtFuD3lQem6id3IuSbXkWgeGp AApA== X-Forwarded-Encrypted: i=1; AJvYcCWYTK+ypT+ztModrYbhfgQ6rDoGAWBoif47y2lUqYsWGTJ5AH4X5T7jrW+F7KJwxs9iNPtA1GjULGM+9ts=@vger.kernel.org X-Gm-Message-State: AOJu0YwIytJdBhb2AHjzZrsbJikyEnScTn7IbDbhg0qhRHh1cXjgDPbg TX3SbHs4aL5Jwunj0MlkMbpH6Y+WRlaO0rGkbLyvAkOtNh+3X/bCAOjs/rIBgJ7WkStS1lC2GHd DxbFm4fNzNnz76k7smYAWp6QEUCP6XrMCghPfJGq4LtbhVZ3yPoQwN+ORM80ryNpOSg== X-Gm-Gg: ASbGncvyam8/pQI+PRehGUAbKi339AS4QA7DGXAyQ0NW5RI8jG0EcaS2XXuvkdPcLw8 GcEEQa9pJnZJytoNr9hlmsCYlqL9LYi7jHVSXKSvcOCQ8X12dCJxcepATjb1fo9Lnylx6Vr7Nnk CjXoF3v0qbBzQcbjBjwc/9UC9pizQcEfwDGRzs+X/ERX47VZnuaoW3TUc8OLxXA4/SGUPuxw3eE p9N9w90a4wugvBgl7DA9vVsCkun6U+pr5GNBymZAlGrdlLRDrnwGZl3fZqq4c14spZgzWRIlFzO E2yCA0a0qGDr4zqMZox7LJKF9fQsQBEGxeHtIqDv8mHNijJ+ho4Bg2UnWGLij40aR4T+gCfh+NI = X-Received: by 2002:ad4:5bab:0:b0:714:36b2:a260 with SMTP id 6a1803df08f44-71436b2aa69mr119383886d6.0.1756912528519; Wed, 03 Sep 2025 08:15:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKzf82nm21b07pPChbmaSLNG0cWMiPFqfO23yrmL4+PQzlGJM4jozMFEYUd/hUiknVHZDi9g== X-Received: by 2002:ad4:5bab:0:b0:714:36b2:a260 with SMTP id 6a1803df08f44-71436b2aa69mr119383076d6.0.1756912527470; Wed, 03 Sep 2025 08:15:27 -0700 (PDT) Received: from [10.12.114.224] ([2600:382:850c:786a:ff8e:13a:e47c:3472]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720ac16de16sm30827706d6.3.2025.09.03.08.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Sep 2025 08:15:26 -0700 (PDT) From: Brian Masney Date: Wed, 03 Sep 2025 11:15:02 -0400 Subject: [PATCH v2 1/6] clk: tegra: audio-sync: 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: <20250903-clk-tegra-round-rate-v2-v2-1-3126d321d4e4@redhat.com> References: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> In-Reply-To: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter Cc: linux-clk@vger.kernel.org, linux-tegra@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=1756912523; l=1671; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=P/K1i7FofzljhrSueDv/pWynCeqTvU5xHXstL0F7owk=; b=WIU9TP1V3lwK1E6Bzl3annZF1C3X/dJCzNEowbNKKUGh/2qhcuD2XUgjQlh59rAwf72D6j2EZ zPdaX3KzhjGCwHySbROqsYWV6u1zxKdS6xuPBft/N1d2s+VikDW4r19 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. Link: https://lore.kernel.org/r/20250710-clk-tegra-round-rate-v1-1-e48ac3df= 4279@redhat.com Signed-off-by: Brian Masney --- drivers/clk/tegra/clk-audio-sync.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/tegra/clk-audio-sync.c b/drivers/clk/tegra/clk-aud= io-sync.c index 2c4bb96eae16e2d4da8740d4596cdb562fd65e73..468a4403f147a2bfbff65b34df8= b80a0095eed15 100644 --- a/drivers/clk/tegra/clk-audio-sync.c +++ b/drivers/clk/tegra/clk-audio-sync.c @@ -17,15 +17,15 @@ static unsigned long clk_sync_source_recalc_rate(struct= clk_hw *hw, return sync->rate; } =20 -static long clk_sync_source_round_rate(struct clk_hw *hw, unsigned long ra= te, - unsigned long *prate) +static int clk_sync_source_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct tegra_clk_sync_source *sync =3D to_clk_sync_source(hw); =20 - if (rate > sync->max_rate) + if (req->rate > sync->max_rate) return -EINVAL; else - return rate; + return 0; } =20 static int clk_sync_source_set_rate(struct clk_hw *hw, unsigned long rate, @@ -38,7 +38,7 @@ static int clk_sync_source_set_rate(struct clk_hw *hw, un= signed long rate, } =20 const struct clk_ops tegra_clk_sync_source_ops =3D { - .round_rate =3D clk_sync_source_round_rate, + .determine_rate =3D clk_sync_source_determine_rate, .set_rate =3D clk_sync_source_set_rate, .recalc_rate =3D clk_sync_source_recalc_rate, }; --=20 2.50.1 From nobody Fri Oct 3 07:40:38 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 47F132264C9 for ; Wed, 3 Sep 2025 15:15:33 +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=1756912535; cv=none; b=ZJJpBwuzsg+TTIJrY4qxQ50pUyqqiQ3zNo796QnzVGW8wa7I5Pt8HS3uFVt8nGPhwlhzexN058Dmv+NoMOXCxRxhS884MFeySmgDKdSLlSl3ZexuX8wyNofh9+l+KQ3cpvu5BraTQrdhv3L3FY5dBkHUsAM8Hy7BXQKreuFkw6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756912535; c=relaxed/simple; bh=PJVq4/87gTFJLoaD4HfGqwXTByrz5pGbdwRq3T0o3FM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mZ7F6DLZH9XuqRDVCHj5u/m/QVVSIM1zHNASAVEcJqU/YGV0IXxZ1ZRSmiixtvSjnlEwnlQMBOp7rly/BQOpAP1S//pXngWDWgWE5aX2gjBU4z7IFL8HcM0Yr2xKuJQQwyfsXX3zkouIcfmq67gJM81aJcLRpviJAhUyDW09Dx8= 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=J2Pe8HTv; 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="J2Pe8HTv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756912533; 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=k0AC2DCErmz+n/xWKWMBVqT/GGNRgWxc5CPFdstVaL8=; b=J2Pe8HTvQFN6DOGd72cTfsjnOHdr44ipRSTx2TuIp3UMrgioY6PQlrnRNrMuSGaM0ebVTk Ek3J0sFCFmQKeayvZ0CKL8sSeMTF3eMvT98rklRZwD8w+7+j3QRZ8dNBAgIjlAa+xKIwcU zJ1eLVESRWgT1kWaAoC6uPy4gBt9EtA= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-534-VbCmbsblPxqqW2F8770PFw-1; Wed, 03 Sep 2025 11:15:32 -0400 X-MC-Unique: VbCmbsblPxqqW2F8770PFw-1 X-Mimecast-MFC-AGG-ID: VbCmbsblPxqqW2F8770PFw_1756912531 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-70dfd87a763so76527806d6.2 for ; Wed, 03 Sep 2025 08:15:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756912530; x=1757517330; 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=k0AC2DCErmz+n/xWKWMBVqT/GGNRgWxc5CPFdstVaL8=; b=rsRLS0jlFANCixSpVnt562LsZbpkMNjo7AK/8fZmQZKWPd2gskEhd3CidNNnSrABeV b18xGWO4rEKKSu+ZUsdpTmoSnR0DwxbVud5EWboXyeztT4Zr8J6ZKToLZxVlMRO5BMXw KWVpVFZv4xnDJPM3TimbLEH5IyJtt3LkqfYgttU+obTABl8O04Q/7KOimmKMUrf3di1b rfnMJ/mOKIPzBtUvsHXxkCvIsQjESqYipcfcoxGKZlm359EKh4xV1aifOqvlaEYGFVJq AJt+KWU/1g6qUclFbZ/PKJDRIr+spP/LZBMW6CcdVPPNPOlttBckYbw9PkXJ0Rl2M+TG 2LGA== X-Forwarded-Encrypted: i=1; AJvYcCWZBvFSzV6wrQBQ+o3RVLO5eU9uW3jlg2wJFPxshMfgJNdy2ulujoeius8YW20PANP5jZgqyvmFPWHBAAM=@vger.kernel.org X-Gm-Message-State: AOJu0Yz/sMGsNzQg6rWmR8ZuWldfoIT+swr4HRyaz5ny5g47kaaK9man 7RaNCbjx0BO1VqoRUYtzWIHkSZEsKrp8oro+i899YkpR5KcKcMett/3/MMQ5jaYi4/6DYcuFvbT WKgnRZPf6L+nb3j5eT68xFYBXhQmt1d5BHr+LpO2YnJxpW8BUPoDDKSmh58fmiPBiGz1ZbRQadg == X-Gm-Gg: ASbGncvCSXiBvsBnv+qa14BvB/aW3Fn6qmQoONV5E7ZS307T36OjsCW3tFN43/0bZaL 8iWP/udUAhk4fNT1smt0tNAPKifkPeiO5U6WEHEkVzJjl4q4KNAAAW2h/JJUEFCy5EiClxDkG+s hJvL6tAJH2HpTl3Y8vwGxNCSIgcFe7gid1St7TgEuaxjFLcDAci7DvSMhWQnYZkzdD6mYZslb2L KPs1vCVbfu5u9WvrvIydj16/Mzhbiw6NR9OhZPTB6hTIaPTEqPs86ndm/YhEJ1P0iIzXPhWPxiH Gsjgmf9eMjIvuxU8cpQ04xRzCK6jGSVdAzx6pedB/ARROuHn5xoUoMvpwCzo7lDE6+gtrz5fDk4 = X-Received: by 2002:a0c:f083:0:20b0:726:97c8:a6b1 with SMTP id 6a1803df08f44-72697c8a854mr18870776d6.54.1756912529842; Wed, 03 Sep 2025 08:15:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IED8E16uAVeM+5vJ137ALVYC0Wh9vbBPAcITc26atyl6FkjgZTLRJMpDAJJZtvLcuHhPJ8whg== X-Received: by 2002:a0c:f083:0:20b0:726:97c8:a6b1 with SMTP id 6a1803df08f44-72697c8a854mr18870126d6.54.1756912529305; Wed, 03 Sep 2025 08:15:29 -0700 (PDT) Received: from [10.12.114.224] ([2600:382:850c:786a:ff8e:13a:e47c:3472]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720ac16de16sm30827706d6.3.2025.09.03.08.15.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Sep 2025 08:15:28 -0700 (PDT) From: Brian Masney Date: Wed, 03 Sep 2025 11:15:03 -0400 Subject: [PATCH v2 2/6] clk: tegra: divider: 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: <20250903-clk-tegra-round-rate-v2-v2-2-3126d321d4e4@redhat.com> References: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> In-Reply-To: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter Cc: linux-clk@vger.kernel.org, linux-tegra@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=1756912523; l=2145; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=PJVq4/87gTFJLoaD4HfGqwXTByrz5pGbdwRq3T0o3FM=; b=j1kIFJz9wqZzE3zyvQjx9E1DS9XfHi59LnAkJFgAkMN4jfnDPzUCTDEe/f0U42GNwYY8e/rpk 4odgRZo7fFfA9qPfKqfNveGuLPoi7WmNRviBXe3OJ7PGswYotuYAW0k 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. Link: https://lore.kernel.org/r/20250710-clk-tegra-round-rate-v1-2-e48ac3df= 4279@redhat.com Signed-off-by: Brian Masney --- drivers/clk/tegra/clk-divider.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divide= r.c index 38daf483ddf171293666cea25179a9c8809d8c3f..37439fcb3ac0dd9ff672a9e9339= ed6d5429dabaf 100644 --- a/drivers/clk/tegra/clk-divider.c +++ b/drivers/clk/tegra/clk-divider.c @@ -58,23 +58,31 @@ static unsigned long clk_frac_div_recalc_rate(struct cl= k_hw *hw, return rate; } =20 -static long clk_frac_div_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *prate) +static int clk_frac_div_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct tegra_clk_frac_div *divider =3D to_clk_frac_div(hw); int div, mul; - unsigned long output_rate =3D *prate; + unsigned long output_rate =3D req->best_parent_rate; =20 - if (!rate) - return output_rate; + if (!req->rate) { + req->rate =3D output_rate; =20 - div =3D get_div(divider, rate, output_rate); - if (div < 0) - return *prate; + return 0; + } + + div =3D get_div(divider, req->rate, output_rate); + if (div < 0) { + req->rate =3D req->best_parent_rate; + + return 0; + } =20 mul =3D get_mul(divider); =20 - return DIV_ROUND_UP(output_rate * mul, div + mul); + req->rate =3D DIV_ROUND_UP(output_rate * mul, div + mul); + + return 0; } =20 static int clk_frac_div_set_rate(struct clk_hw *hw, unsigned long rate, @@ -127,7 +135,7 @@ static void clk_divider_restore_context(struct clk_hw *= hw) const struct clk_ops tegra_clk_frac_div_ops =3D { .recalc_rate =3D clk_frac_div_recalc_rate, .set_rate =3D clk_frac_div_set_rate, - .round_rate =3D clk_frac_div_round_rate, + .determine_rate =3D clk_frac_div_determine_rate, .restore_context =3D clk_divider_restore_context, }; =20 --=20 2.50.1 From nobody Fri Oct 3 07:40:38 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 8CA7F22B8C5 for ; Wed, 3 Sep 2025 15:15:38 +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=1756912540; cv=none; b=nPyCpeSr7BYkFrH9sjoRzIswhP+OwqFeqbdtH4Kk3NORRwO2bHl7fIS9qZaRp6GipSIsl/q2UQoTjEiFzC66vKZso5vruBt/WQGP8XvjrU+hbwaNxYS1NNCju4xr++CpObPcF3lr6DaaRWqfLOuvWQpYDJmM8qH66rfqYMLxhG8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756912540; c=relaxed/simple; bh=AjcEhiucMili9sf/wwjT6T4E9qy5apL2Ir5PIpobHoI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bNizkNkp/NEFuyqNm+QX5Tr5r6+X4KMuavb8V8TE6jBn2hCIOjvJu0q6nGUaM3oWveIV+igZBrfWq3cT02hTYV44uFztBEgNXOPI2Gscby/8LL5fMV0SD8iD/CLmqtQHqOQL5VCwJax2bAcCLaAeFgUENLrYz4zUqKZS1bWx8+U= 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=SI7jxgjY; 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="SI7jxgjY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756912536; 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=e+0vXFzhSxSwj3v2mrFQi86NSXUL4ZDppFXq+HtAwjk=; b=SI7jxgjY9PZY/of1KI5W7yU4fHEyW5bop9oZgg8L7T/JTMKIM9VQcgOB7FALVmnCIA8lCV ktb9mcFeovNPkg3rPUUzd1cAgQOcrFgNcm7IiPsJFjIYF1A/GXkWvzVGsJ97wDJ2PxZEQy J+jv1Vrr03tOuPD2i7YgZUckhTFumzw= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-223-Wcf6dW0DMpKwv4c4U2YGKQ-1; Wed, 03 Sep 2025 11:15:34 -0400 X-MC-Unique: Wcf6dW0DMpKwv4c4U2YGKQ-1 X-Mimecast-MFC-AGG-ID: Wcf6dW0DMpKwv4c4U2YGKQ_1756912534 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-70dfd87a763so76528416d6.2 for ; Wed, 03 Sep 2025 08:15:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756912534; x=1757517334; 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=e+0vXFzhSxSwj3v2mrFQi86NSXUL4ZDppFXq+HtAwjk=; b=caMwQHQq6yiRBoPiWU729GdXVJQcJM9o6epnyTD0lZMTwS88XNP5T5nlKCuLgLgL96 xrXcvemo0+AvKaxyR0o883u3azUsNPC4keXN/wYKVVCS4YTBhVf2QAag9VIodTKY335Y mpmJ0oIqnOxYd3CY9lttAcYYuV/iHA1tAmu5QFQnizU7LnDD02jdaTDk9XAKuHfTdR3f hqg819PdeMUkYVzU5Y6aN+4BKgJkqE6TdtYk+xM2XXn0Qj7qa+oxzQZrdHmILK6+otbA 4NHWy10YbF6pc99UluY8ZYnxag+Oq7+hjv0i8Kw0b9FA2pafasP4NW2M94j/crWtNz80 10TQ== X-Forwarded-Encrypted: i=1; AJvYcCVapGQvcc/RM5qs91HzYwabqYSotFEpbUcOeuU0vCeVQEKt6w5wKYn7bJjub1e6lti3PRgCZVl6B/JT5w0=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1K7ZOUZahsfSXDlVxXeJmL219Y8Pkr6XfAl36Sgq4C7fFkFro oZj5zK6QYkFulRHJZl27uGSVzrwcqCdVeZz4XGDolMwXQUzE1sgkzs1gY8ZhUHlb9x9Cc6cmk9/ h521J4SQdaAGxnl9RvZgAHWC1+YtSplk7yc3oM4JUsexmFPQwe48V4qTL3LP7uIqCWQ== X-Gm-Gg: ASbGnctmnuOHTeZ5zjM5TsF8Xuck2PyssMLFPwQGR/tv9wPO8NAOqWBNXUXGtj3YBWy vvtX2QtUlLK1I7AMuV1OVS/sGVKl6XRWqgHY+lPqr/3LSVO4ITAAVs//N3xqcMXIQ9dg/7dgNqE rrganX35tlNrrVWXnKtUuaQcpReru8wJ6/TyZzY3At+9tA3p+2zlpxBgs0dAp7/1n8sdt5ksJHK fjLz+dQD97gdqN+oiNz02Vc/nqzJYXhbjPCjvNzI1sN9IChZyFcnoLR7UfSeB3osNKYA7HlgHIX 4Yjvew7gydv2N0XKa/T5X+VePVQB1WeWnwJpf5D+PfNgUnGo2D7g9EmymfeXZIib/Kz0sCCNB0I = X-Received: by 2002:a05:6214:e43:b0:726:c288:a666 with SMTP id 6a1803df08f44-726c288aa54mr17036326d6.59.1756912533598; Wed, 03 Sep 2025 08:15:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3IlMKWWgNAO7Q6WOeecM/0SWSXq5cZbNHqhjh9Ns5zZcD414eMglOR+F+Y+S6eyNAlpLYGQ== X-Received: by 2002:a05:6214:e43:b0:726:c288:a666 with SMTP id 6a1803df08f44-726c288aa54mr17035696d6.59.1756912533116; Wed, 03 Sep 2025 08:15:33 -0700 (PDT) Received: from [10.12.114.224] ([2600:382:850c:786a:ff8e:13a:e47c:3472]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720ac16de16sm30827706d6.3.2025.09.03.08.15.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Sep 2025 08:15:30 -0700 (PDT) From: Brian Masney Date: Wed, 03 Sep 2025 11:15:04 -0400 Subject: [PATCH v2 3/6] clk: tegra: periph: divider: 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: <20250903-clk-tegra-round-rate-v2-v2-3-3126d321d4e4@redhat.com> References: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> In-Reply-To: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter Cc: linux-clk@vger.kernel.org, linux-tegra@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=1756912523; l=1192; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=AjcEhiucMili9sf/wwjT6T4E9qy5apL2Ir5PIpobHoI=; b=70I3Mq4ZlKGkt6RonBDIV0MOdusccrx3oFKMRyi6Oj3qJe6anIuKkXklg2G3L0mxPS9RSXztK VIj/MFE74U1B/LMA9OcxnqvYJNn8ONfhSkWtW74K+w2SQ3VpCWSv8y0 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(). Note that this change also requires the same migration to drivers/clk/tegra/clk-divider.c. Signed-off-by: Brian Masney --- drivers/clk/tegra/clk-periph.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/clk/tegra/clk-periph.c b/drivers/clk/tegra/clk-periph.c index fa0cd7bb8ee67801dde3c65eababe30c96a176ef..6ebeaa7cb65648e77f11f2c676a= a3428bc490a73 100644 --- a/drivers/clk/tegra/clk-periph.c +++ b/drivers/clk/tegra/clk-periph.c @@ -51,16 +51,10 @@ static int clk_periph_determine_rate(struct clk_hw *hw, struct tegra_clk_periph *periph =3D to_clk_periph(hw); const struct clk_ops *div_ops =3D periph->div_ops; struct clk_hw *div_hw =3D &periph->divider.hw; - long rate; =20 __clk_hw_set_clk(div_hw, hw); =20 - rate =3D div_ops->round_rate(div_hw, req->rate, &req->best_parent_rate); - if (rate < 0) - return rate; - - req->rate =3D (unsigned long)rate; - return 0; + return div_ops->determine_rate(div_hw, req); } =20 static int clk_periph_set_rate(struct clk_hw *hw, unsigned long rate, --=20 2.50.1 From nobody Fri Oct 3 07:40:38 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 9F63D24C07A for ; Wed, 3 Sep 2025 15:16:10 +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=1756912572; cv=none; b=RGjcllEUCSbQPhJfBL7tJDeu8gdaGKoveFmrqmhFplEW9mfVEURJaZeGguWKWCOy7mxlJJ7L2zX4IdC0PVED3/K1SM67S3Et16lPl9mo/9R2sMSBVyon1yd1oInzZe44Mq/3IQipEuMyBoUZ/RFNItriiHx9n9nq8v7zsvWdKBY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756912572; c=relaxed/simple; bh=43sEbwhMVLXr4Ugy2k4lhtQIjlFVPQRMntWIuVLuAbk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RGPJHLCe/06IwE6O7IqASpxufS7bBV/U6EsGrQ5bLtrytlwDAXBcEI0m0DjPwQT7tzGbiBVrQ/ANq/iJaoPfhZFFdmTuF36mraEv/GFOGkgglMHe8VcER1XUqPcGNtbCgQW/17yKWUfbhnYvr2z+LcajNuHSwjMbuaSteKn/zS4= 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=El7VJnH/; 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="El7VJnH/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756912569; 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=x9cuOYxu0U7DIdqQ6OT/K5slwo9p+cHFbhRnmBL6l1o=; b=El7VJnH/wjQD+FHX8m7PPhgEuApJ8dOdPqsC5NfiHsSV9PNL1w3ErHmCl9/72BKsMKsLdT ovxSUnbr929TzSmL2By58DyoApTH0lfCFENMqkPBsgwMMyJ6b/W+3O+J1okaPC46eCTB3I 7DAyTvBbdjeLl/jAECdn3ew+xNP1JeY= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-42-TJ2-aQ8cMoSxJk8MCAbfjw-1; Wed, 03 Sep 2025 11:16:08 -0400 X-MC-Unique: TJ2-aQ8cMoSxJk8MCAbfjw-1 X-Mimecast-MFC-AGG-ID: TJ2-aQ8cMoSxJk8MCAbfjw_1756912568 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-70de52d2904so158934386d6.0 for ; Wed, 03 Sep 2025 08:16:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756912568; x=1757517368; 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=x9cuOYxu0U7DIdqQ6OT/K5slwo9p+cHFbhRnmBL6l1o=; b=OjFgODIcI0DVigmdrRMnuJHQGtL6SpRFyVIEG6IcJeihgQl+4TG1vMAYkip7oHGrL1 yHpl2aGHvwyW6WzL67gsQiOJlIMSD3VHccEsjcl09Fmg1pXEi86XKl9rg0jnRlQMVM3G aB7PBbluqh+yN3PvGmmbUOlWljSSF47yRiL6Ncf+K7yJW/IiDhPomOtr8GPxX0+Qpulv 4l4VUUeteNOSQofiqRn2btIYeCzqwDO1z/JwxJLgZhixTb/HpFHcw/TO17Lbz1pBzWAG ka9buBmi4LQafSQgfslX+K2SQ9TMX5JYbT+EeSWfYBAbEvGdcs+Q0xNfE+Dp2dS3ZdPo /gxQ== X-Forwarded-Encrypted: i=1; AJvYcCXti46aFpWncX2XLbaYXWI7fI6f07thBZVlbJp1DdA7uAcqb3eeAhUy6H+RsQ0i8PmvO3hhS5k4LDFgQv8=@vger.kernel.org X-Gm-Message-State: AOJu0YzXsUHJMxdq+lp/q8elr2IgIhckM2nioovOo40TCrENd40YOH99 9UpBeEAVi3+COyBO0SZEsh1zdnfVDg5G9iyYe3riY6N9w5tTju3a/u02Toqsmxt1vv+MBAWrMIM Ulr/l0wqePYelR7AQyfnrSv/Fvf2bx5OIsdqRZKbdTycuo70vi/E/R8t5GjG8lHkCPA== X-Gm-Gg: ASbGncsvw1qLbKpyc+Qiy7SsfobxoiSfXd2fF91DXPkugnzIDgMYMBTcMw9ykjzUkTR py3JKlSkXMWzuEB5pXn7w4yXsbOxdQu5mD4qYxHtmtOnly1eDb39kmJQ2jL3pld5Okn7s07kWbV SG5TC9tFaFnPPZbKt48LFoLupdPwLkPVunPxkSaJcSjPdAIOdUR3Rv7iWnM/opwlly87Q8V7QAc j1a18OsOoSGJI6tZds9JjfHqYUPT5WKUXAOB1qund+FcMkOIEbgUTvFGadnEPd+6izPTpQL+RHk OcuJWC5sEsm6nTDQhTiIokId4JZ8fCfVvxL8JAPzvBP72rgSIuoExEbwuKwf3CA/cr01LrGHhu4 = X-Received: by 2002:ad4:4eeb:0:b0:70d:961c:bb0e with SMTP id 6a1803df08f44-70fac9202d8mr197031946d6.58.1756912550967; Wed, 03 Sep 2025 08:15:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnqDjIqsiZca+ggH4RMjYaXqAO0ErU7lwak2EX2JoTANTpehd9a2V8hc1liqn8FqdeAjJJmQ== X-Received: by 2002:ad4:4eeb:0:b0:70d:961c:bb0e with SMTP id 6a1803df08f44-70fac9202d8mr197013286d6.58.1756912536653; Wed, 03 Sep 2025 08:15:36 -0700 (PDT) Received: from [10.12.114.224] ([2600:382:850c:786a:ff8e:13a:e47c:3472]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720ac16de16sm30827706d6.3.2025.09.03.08.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Sep 2025 08:15:34 -0700 (PDT) From: Brian Masney Date: Wed, 03 Sep 2025 11:15:05 -0400 Subject: [PATCH v2 4/6] clk: tegra: pll: 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: <20250903-clk-tegra-round-rate-v2-v2-4-3126d321d4e4@redhat.com> References: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> In-Reply-To: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter Cc: linux-clk@vger.kernel.org, linux-tegra@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=1756912523; l=5433; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=43sEbwhMVLXr4Ugy2k4lhtQIjlFVPQRMntWIuVLuAbk=; b=rpRJizWaPvqeE8fyxaXKWGMOtJvlvuOaw1CCwjSgxH0jKIiYpjpuikcEEp7O69HVv0KF16BxN TXt73fGvnjOAYUe30HyZWWwnRS3516J0fBBdhdXNA86DnGkXxGPj02D 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. Link: https://lore.kernel.org/r/20250710-clk-tegra-round-rate-v1-4-e48ac3df= 4279@redhat.com Signed-off-by: Brian Masney --- drivers/clk/tegra/clk-pll.c | 52 +++++++++++++++++++++++++++--------------= ---- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c index 100b5d9b7e26e906f71963152ad50bd0a89d14d6..591b9f0c155a033ab46fbb0a1de= 742efed560b5c 100644 --- a/drivers/clk/tegra/clk-pll.c +++ b/drivers/clk/tegra/clk-pll.c @@ -840,8 +840,8 @@ static int clk_pll_set_rate(struct clk_hw *hw, unsigned= long rate, return ret; } =20 -static long clk_pll_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *prate) +static int clk_pll_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct tegra_clk_pll *pll =3D to_clk_pll(hw); struct tegra_clk_pll_freq_table cfg; @@ -849,15 +849,20 @@ static long clk_pll_round_rate(struct clk_hw *hw, uns= igned long rate, if (pll->params->flags & TEGRA_PLL_FIXED) { /* PLLM/MB are used for memory; we do not change rate */ if (pll->params->flags & (TEGRA_PLLM | TEGRA_PLLMB)) - return clk_hw_get_rate(hw); - return pll->params->fixed_rate; + req->rate =3D clk_hw_get_rate(hw); + else + req->rate =3D pll->params->fixed_rate; + + return 0; } =20 - if (_get_table_rate(hw, &cfg, rate, *prate) && - pll->params->calc_rate(hw, &cfg, rate, *prate)) + if (_get_table_rate(hw, &cfg, req->rate, req->best_parent_rate) && + pll->params->calc_rate(hw, &cfg, req->rate, req->best_parent_rate)) return -EINVAL; =20 - return cfg.output_rate; + req->rate =3D cfg.output_rate; + + return 0; } =20 static unsigned long clk_pll_recalc_rate(struct clk_hw *hw, @@ -1057,7 +1062,7 @@ const struct clk_ops tegra_clk_pll_ops =3D { .enable =3D clk_pll_enable, .disable =3D clk_pll_disable, .recalc_rate =3D clk_pll_recalc_rate, - .round_rate =3D clk_pll_round_rate, + .determine_rate =3D clk_pll_determine_rate, .set_rate =3D clk_pll_set_rate, .restore_context =3D tegra_clk_pll_restore_context, }; @@ -1195,7 +1200,7 @@ static const struct clk_ops tegra_clk_pllu_ops =3D { .enable =3D clk_pllu_enable, .disable =3D clk_pll_disable, .recalc_rate =3D clk_pll_recalc_rate, - .round_rate =3D clk_pll_round_rate, + .determine_rate =3D clk_pll_determine_rate, .set_rate =3D clk_pll_set_rate, }; =20 @@ -1353,15 +1358,15 @@ static int clk_pllxc_set_rate(struct clk_hw *hw, un= signed long rate, return ret; } =20 -static long clk_pll_ramp_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *prate) +static int clk_pll_ramp_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct tegra_clk_pll *pll =3D to_clk_pll(hw); struct tegra_clk_pll_freq_table cfg; int ret, p_div; - u64 output_rate =3D *prate; + u64 output_rate =3D req->best_parent_rate; =20 - ret =3D _pll_ramp_calc_pll(hw, &cfg, rate, *prate); + ret =3D _pll_ramp_calc_pll(hw, &cfg, req->rate, req->best_parent_rate); if (ret < 0) return ret; =20 @@ -1375,7 +1380,9 @@ static long clk_pll_ramp_round_rate(struct clk_hw *hw= , unsigned long rate, output_rate *=3D cfg.n; do_div(output_rate, cfg.m * p_div); =20 - return output_rate; + req->rate =3D output_rate; + + return 0; } =20 static void _pllcx_strobe(struct tegra_clk_pll *pll) @@ -1598,12 +1605,15 @@ static unsigned long clk_pllre_recalc_rate(struct c= lk_hw *hw, return rate; } =20 -static long clk_pllre_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *prate) +static int clk_pllre_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct tegra_clk_pll *pll =3D to_clk_pll(hw); =20 - return _pllre_calc_rate(pll, NULL, rate, *prate); + req->rate =3D _pllre_calc_rate(pll, NULL, req->rate, + req->best_parent_rate); + + return 0; } =20 static int clk_plle_tegra114_enable(struct clk_hw *hw) @@ -2003,7 +2013,7 @@ static const struct clk_ops tegra_clk_pllxc_ops =3D { .enable =3D clk_pll_enable, .disable =3D clk_pll_disable, .recalc_rate =3D clk_pll_recalc_rate, - .round_rate =3D clk_pll_ramp_round_rate, + .determine_rate =3D clk_pll_ramp_determine_rate, .set_rate =3D clk_pllxc_set_rate, }; =20 @@ -2012,7 +2022,7 @@ static const struct clk_ops tegra_clk_pllc_ops =3D { .enable =3D clk_pllc_enable, .disable =3D clk_pllc_disable, .recalc_rate =3D clk_pll_recalc_rate, - .round_rate =3D clk_pll_ramp_round_rate, + .determine_rate =3D clk_pll_ramp_determine_rate, .set_rate =3D clk_pllc_set_rate, }; =20 @@ -2021,7 +2031,7 @@ static const struct clk_ops tegra_clk_pllre_ops =3D { .enable =3D clk_pll_enable, .disable =3D clk_pll_disable, .recalc_rate =3D clk_pllre_recalc_rate, - .round_rate =3D clk_pllre_round_rate, + .determine_rate =3D clk_pllre_determine_rate, .set_rate =3D clk_pllre_set_rate, }; =20 @@ -2321,7 +2331,7 @@ static const struct clk_ops tegra_clk_pllss_ops =3D { .enable =3D clk_pll_enable, .disable =3D clk_pll_disable, .recalc_rate =3D clk_pll_recalc_rate, - .round_rate =3D clk_pll_ramp_round_rate, + .determine_rate =3D clk_pll_ramp_determine_rate, .set_rate =3D clk_pllxc_set_rate, .restore_context =3D tegra_clk_pll_restore_context, }; --=20 2.50.1 From nobody Fri Oct 3 07:40:38 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 49AFB23ABB6 for ; Wed, 3 Sep 2025 15:15:43 +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=1756912545; cv=none; b=SDPuMrQsWl4dzQfcN8bozmVkDDHji4YaaoAUBCbbnXS/J/UKCGzYTabmK6LiNPVp0rpNBpKklWNPgvOuijQSTe/27B5DfzQ25z37zOzGaxI30y28J3txF4tdsHDuUzVzWBKd7v+n/BAoFa6FKMJonujJwBlKYHNKjS1vkLcL9U8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756912545; c=relaxed/simple; bh=xHYSF20Z40O1IS/P13jD4/OabcPSIx9zs970N7AMeQ4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OVHDIGJ0/j9+kd6WvWAOd3Ug4/0ihE3z6f+t8lA7g3K9iobtZxt+/TkpBYKo4epBsVhD886iACjAjYW32gE1O0ImPHhxVheu2pg0RLjgp14aUzog8Yu12RP+oE52WM0ln6L6s7OUqzNSGzMUz8GaHw63YL9MsL9jg/R3h3qREQE= 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=RBGUPtwM; 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="RBGUPtwM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756912542; 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=4DqnCcjwRpbK8o4p2iXe6lSoJojb6f7QiC9/BUgcCv0=; b=RBGUPtwMXXy/wflSHnDPCk3KKf11vWrDNKRTHN17zvUP9qJuw2xYJOMFIyXR7X2jGxV4Rq iiX6YFSnhzaeQtFCn3BFd9OnfvF7mZTsqoIh3O+UBGSijG9V8xxgIAYYqirPgOvdiducXL 0K5R5S6aWkJf52RQEJ03qzf9S4qPfwQ= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-54-9egDOlKRM2mvYNwW1Sc35w-1; Wed, 03 Sep 2025 11:15:41 -0400 X-MC-Unique: 9egDOlKRM2mvYNwW1Sc35w-1 X-Mimecast-MFC-AGG-ID: 9egDOlKRM2mvYNwW1Sc35w_1756912540 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-72108a28f05so57533046d6.3 for ; Wed, 03 Sep 2025 08:15:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756912540; x=1757517340; 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=4DqnCcjwRpbK8o4p2iXe6lSoJojb6f7QiC9/BUgcCv0=; b=Ff6sqkINxN4gYAhxqTKMM1EBcz3hys2c9k5jjPu8oMFxoBbcsRbVgnxmrYKPkVejyl qNUkmt/KbjrWn3v9vwxrBiyvqiV3b5GQOVx3HvHwTRT+b4BQCv3eQBdzAXsH5yt5azBM W0q/D31l3Iv1YoSz0lZ8laLU7apVm9lIP5zJxZwH2k61BreC+ZBwmp3R/i6vO2tYEJlm /v9qKGtYhaZOjmb661V2nHiHHev/kw2K8uu2lVWGXJPduGYPDwPn1aFaBh8L1n8xlryd 1Drqc0dnusZY1YUm1LNDNg8oDiZFhrJ/ZCcmKtZiC2r/OodUUyalqADPIJD/K9YuNhHA 9NEA== X-Forwarded-Encrypted: i=1; AJvYcCXC7xI323CBzoLXk/LtEdB0kt837VDlHOWXoegOpSS4Xck7JNwy9bpO+gl+TTUlS9biCLUA40cJ2Z4vAzI=@vger.kernel.org X-Gm-Message-State: AOJu0YxeM5XMYAoZLOuE7C6f76TomwXIg86qmBb9FrddJhtyVbRBG47E mAqklGCYkzENMXyG75Ax8Aj672UwakoX4l9qQp7RzD4cZKjMBZb2SBTIj6OirAdOE2yX1C3uMoR F1dtE405g13bgwfLPC618Vd+7nlj/x09jmB1nu+7ORAZrfVCLxWhF/NdUkE/ymUmTRw== X-Gm-Gg: ASbGncudebBbKz/kqwN+7CeMYCwVOGePLrXkef+NzrclCSXjF8l9DP+s+YUMMOE4hEs d4tsCUDwVzH+xA47vHAXEIwX4YigRn4t46k7jkwOD16mfm28iMFN5JkkeABzTbIOFHDt0yVFwta eQVS3AukLHAp8JLm6KTVKbR6WmM1ENTBpTjKegJmDrD4vNuZusGNO7eJCqrsI5guRN5KNKkfz/L UddaTrYLLjw1ELLAhl8wpvKNwH8VhydOipbiAdQx5PErRyVWwSWYrBxYgrUEMDWr44hryzj8R1Q tzVkYHPIwWgUg6Wo82Zxrcc39ZRswVI/VAdT20Nr9XyzryRkXgSpGn8ULAOx+PASZr5QHxnhTPs = X-Received: by 2002:a05:6214:501d:b0:712:e30b:ef1d with SMTP id 6a1803df08f44-712e30bf1f3mr165062176d6.63.1756912539933; Wed, 03 Sep 2025 08:15:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5I10I0WKxYKgKAEy94Wym7iHHUY6i406j/dnJpfUUA78DHHNcSjK7v+PoMe2ZX5mXlpF6Hg== X-Received: by 2002:a05:6214:501d:b0:712:e30b:ef1d with SMTP id 6a1803df08f44-712e30bf1f3mr165060786d6.63.1756912538520; Wed, 03 Sep 2025 08:15:38 -0700 (PDT) Received: from [10.12.114.224] ([2600:382:850c:786a:ff8e:13a:e47c:3472]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720ac16de16sm30827706d6.3.2025.09.03.08.15.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Sep 2025 08:15:38 -0700 (PDT) From: Brian Masney Date: Wed, 03 Sep 2025 11:15:06 -0400 Subject: [PATCH v2 5/6] clk: tegra: super: 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: <20250903-clk-tegra-round-rate-v2-v2-5-3126d321d4e4@redhat.com> References: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> In-Reply-To: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter Cc: linux-clk@vger.kernel.org, linux-tegra@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=1756912523; l=1247; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=xHYSF20Z40O1IS/P13jD4/OabcPSIx9zs970N7AMeQ4=; b=N3/ppBwKIalyXCuBEW2R9w9ULDE/nReiU7B/SInxIldEMfFQK4/50ssw1KjHFQxbm//MjBL0r 6WVAAeReogDDWplhQIpZ9kTvZzJ/B0C4NUYb/zmnGIQq4g+kbCW93kh 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(). Note that this change also requires the same migration to drivers/clk/tegra/clk-divider.c. Link: https://lore.kernel.org/r/20250710-clk-tegra-round-rate-v1-5-e48ac3df= 4279@redhat.com Signed-off-by: Brian Masney --- drivers/clk/tegra/clk-super.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/clk/tegra/clk-super.c b/drivers/clk/tegra/clk-super.c index 7ec47942720c5aa43f35107369b42804f4847b97..51fb356e770eeaea9d26ef48f29= 8dbc00e164732 100644 --- a/drivers/clk/tegra/clk-super.c +++ b/drivers/clk/tegra/clk-super.c @@ -147,17 +147,10 @@ static int clk_super_determine_rate(struct clk_hw *hw, { struct tegra_clk_super_mux *super =3D to_clk_super_mux(hw); struct clk_hw *div_hw =3D &super->frac_div.hw; - unsigned long rate; =20 __clk_hw_set_clk(div_hw, hw); =20 - rate =3D super->div_ops->round_rate(div_hw, req->rate, - &req->best_parent_rate); - if (rate < 0) - return rate; - - req->rate =3D rate; - return 0; + return super->div_ops->determine_rate(div_hw, req); } =20 static unsigned long clk_super_recalc_rate(struct clk_hw *hw, --=20 2.50.1 From nobody Fri Oct 3 07:40:38 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 853491339A4 for ; Wed, 3 Sep 2025 15:16:03 +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=1756912565; cv=none; b=S/ZenhZPx0xkp+jkfnevB7tOFZehxkS9J7t2BKrIBtDcDoF3gTosPytXdjJrA1+JacfDfLYrZ9x7ljpu9Hw7cJ3ZWOoNlj6+F6WAoWQWNk0UM/Fw22RrfZDL045mjWolFXVC1URHuTPsKOOO0GSmAIl7Kilz38mxnukwASq0ia4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756912565; c=relaxed/simple; bh=f7zeRbtjFE6oZbaxfqDkdxVp3qdgNoSMwDXWIe1dhQQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ea+y21efMRzSTs49p8ok6YfjpNo3VyXs8OffOzvX9JXahhZyLAac+BkLd+YXThf1R5nrw2Uei0pZfVsr2mXFOjL8WH3Wl67kUIliPO79BVvV6+JMiv+pJxjgxN8wbbtEWQr1umXj05OgZ20Ul9CQBjlIy67INDvaR3Van8dAi98= 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=SWtsPmFf; 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="SWtsPmFf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756912562; 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=A4HCy2NL7Blg6ktZUTQG7x2ot9qLktGXqBXqd0E8mS4=; b=SWtsPmFfGxADXZPo1A/j/qw67/61PYt3txLvd3zBvH7IhV4tZtvzZT/2dlqTaXL4vhRJ21 AEGx4kMgHi53+D2eymCsDUSj2drTLn7WM7A2i6esFM21JXrQYdXbwXD6LbJFCnnnoZDD+p czHFvzxi5u3WXOFvWHQUR0cZpD7qoaI= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-257-0zx0lTpfOf6mWADxdDW6aw-1; Wed, 03 Sep 2025 11:15:59 -0400 X-MC-Unique: 0zx0lTpfOf6mWADxdDW6aw-1 X-Mimecast-MFC-AGG-ID: 0zx0lTpfOf6mWADxdDW6aw_1756912557 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-70dfcc58976so103518666d6.2 for ; Wed, 03 Sep 2025 08:15:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756912553; x=1757517353; 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=A4HCy2NL7Blg6ktZUTQG7x2ot9qLktGXqBXqd0E8mS4=; b=OqsilR4yRGPwElGMnXOrwk62XfwXXZv85XOmRuaGUezWS72NAzXitCOAyZ/gZUJZy+ q+pKJQvWmO2EtavTZzsSkyLPLHB/ghq+gYAApVPAOo9k5LoxKZAuKMZqCnYNEQIEVcMN RHE0wQXLkESGBflqIF2HPinBnezgcRxem9U5nX1pixcHzHbNgY8heY5FQpWiUOYICeRH iryVy74kPPfRIQSEpNnZHCjeN8MtAHGjE5GyCCOwvkJyYHhlYGc0mZw+pU312fZR+uN7 z6KxtVJJqIgEHR7xS5IMBenCzC4iNRHEaE5Oe+WBjY8RQX+ylapIepIwcebNDMcRKBEP rCPQ== X-Forwarded-Encrypted: i=1; AJvYcCUjoXv0vpg/XpzH/CCpp85UhmacVe86EsPNGOgdQwiekU3rXmyuX2BOEd5B4DgQmRgQG6CsMu8Zv+Yyi0I=@vger.kernel.org X-Gm-Message-State: AOJu0YzP8AmJ1uEGjmpVnsPF5J4WTDheKD46ad3Nfs7DHGb9SQdroYaS ul1mmeFBRiT410bgPHBsZYtUSxF3l3qNOni5sMEwf74Zlz1r1NXZLy2iF9hJ7987JF6QJcgGT9C 42GsxStoPE36CjFblkFTnfJAmuhc5ykbxaQNvFdhzLagMql+FYedjAZsXX2/sJBBpdjdM2f/atA == X-Gm-Gg: ASbGncu+8loRg9Ye1mhR6QWuDcvNMUBFyoNVsxh07CYf1cpFa0hyJAxIRfa7gmjzt8M MSy3MaCichr1MNHBVG79cXulwflQh3lGjvEzVNG5qLYRnZEb+R3UKyIbyVO3H0ABJItdEPNerU8 +cfAy1LtwfyKH9/AJ7YnVfUTFlma+q2m7yBudMivbeP/sZhOFbsHqmtt95YDa4IDsJomk3AP6Ol v6kYnwi2Vbe+rS1wQonTSW0E+BIaUxD1WnHHJiKG3M1eW+RUasYM6gAod8s0JAnvbqMyJ0vPB4i m+B6upbdpkvevzmYOiKWI4quQas8/ubJIE573nIoqzrGeqLKGcIeKoo0EY0/moU2fY/gdiA9EGw = X-Received: by 2002:ad4:5ce2:0:b0:71a:5b14:3cbe with SMTP id 6a1803df08f44-71a5b143fe4mr120710346d6.27.1756912552838; Wed, 03 Sep 2025 08:15:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlQ9BdrI0T15lHuajgK3Ofx/Mn+DHDA/1mjdjP2xlPN5vgFUBDe96IRrxXSlBhDZltKM9h5g== X-Received: by 2002:a0c:f118:0:b0:722:5704:daf6 with SMTP id 6a1803df08f44-7225704dbc7mr42110476d6.39.1756912541147; Wed, 03 Sep 2025 08:15:41 -0700 (PDT) Received: from [10.12.114.224] ([2600:382:850c:786a:ff8e:13a:e47c:3472]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720ac16de16sm30827706d6.3.2025.09.03.08.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Sep 2025 08:15:39 -0700 (PDT) From: Brian Masney Date: Wed, 03 Sep 2025 11:15:07 -0400 Subject: [PATCH v2 6/6] clk: tegra: tegra210-emc: 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: <20250903-clk-tegra-round-rate-v2-v2-6-3126d321d4e4@redhat.com> References: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> In-Reply-To: <20250903-clk-tegra-round-rate-v2-v2-0-3126d321d4e4@redhat.com> To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter Cc: linux-clk@vger.kernel.org, linux-tegra@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=1756912523; l=2321; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=f7zeRbtjFE6oZbaxfqDkdxVp3qdgNoSMwDXWIe1dhQQ=; b=KqIQakTxpJPpr1rcYh3sziesySXJxjBrI6+0TTX75xgEW8kKgKvFNHcGYKnxBX9/2bRbUKoda ZEdPYfU2taXC6VUs1K4llMiSTTFXWFnjCoqsRS44x/u1CUt0bBPlqa0 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. Link: https://lore.kernel.org/r/20250710-clk-tegra-round-rate-v1-6-e48ac3df= 4279@redhat.com Signed-off-by: Brian Masney --- drivers/clk/tegra/clk-tegra210-emc.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra210-emc.c b/drivers/clk/tegra/clk-t= egra210-emc.c index 672ca8c184d2c6e9a7f26c07d036f3359af42bc4..fbf3c894eb56e3e702f0a1f6751= 1463dc9d98643 100644 --- a/drivers/clk/tegra/clk-tegra210-emc.c +++ b/drivers/clk/tegra/clk-tegra210-emc.c @@ -86,22 +86,30 @@ static unsigned long tegra210_clk_emc_recalc_rate(struc= t clk_hw *hw, return DIV_ROUND_UP(parent_rate * 2, div); } =20 -static long tegra210_clk_emc_round_rate(struct clk_hw *hw, unsigned long r= ate, - unsigned long *prate) +static int tegra210_clk_emc_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct tegra210_clk_emc *emc =3D to_tegra210_clk_emc(hw); struct tegra210_clk_emc_provider *provider =3D emc->provider; unsigned int i; =20 - if (!provider || !provider->configs || provider->num_configs =3D=3D 0) - return clk_hw_get_rate(hw); + if (!provider || !provider->configs || provider->num_configs =3D=3D 0) { + req->rate =3D clk_hw_get_rate(hw); + + return 0; + } =20 for (i =3D 0; i < provider->num_configs; i++) { - if (provider->configs[i].rate >=3D rate) - return provider->configs[i].rate; + if (provider->configs[i].rate >=3D req->rate) { + req->rate =3D provider->configs[i].rate; + + return 0; + } } =20 - return provider->configs[i - 1].rate; + req->rate =3D provider->configs[i - 1].rate; + + return 0; } =20 static struct clk *tegra210_clk_emc_find_parent(struct tegra210_clk_emc *e= mc, @@ -259,7 +267,7 @@ static int tegra210_clk_emc_set_rate(struct clk_hw *hw,= unsigned long rate, static const struct clk_ops tegra210_clk_emc_ops =3D { .get_parent =3D tegra210_clk_emc_get_parent, .recalc_rate =3D tegra210_clk_emc_recalc_rate, - .round_rate =3D tegra210_clk_emc_round_rate, + .determine_rate =3D tegra210_clk_emc_determine_rate, .set_rate =3D tegra210_clk_emc_set_rate, }; =20 --=20 2.50.1