From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8880B8494; Wed, 16 Apr 2025 08:52:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744793573; cv=none; b=EQjfCi1Vrm+qPZ/mjivGzjHlFIV+veGuOt8U3ZlDkfUscaUQH69mssv3UoAc/rIm2/0MIwYoj3pyOUh284ROZE33r9uQhgaWcloBG6t1weueZE8n601YQdc525/i4qxZBjMTlNPrrGJNVMhNa0fSTydOK2zGFwdGaC8JKJuvdEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744793573; c=relaxed/simple; bh=RnJXf3yeEkNSvfYLGOSZQdoqPefOM/O6vhN6IFZZRog=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DBK92+WCmXfOiHMnhjE/iSSDfjRER/U4vVKa0+wte81cpESNL1gu3VRwfZN5QrLFNg74b0k/Fl4x5/P+ktpE8qqsF6OaSePRsOHTuPRWU0ilMgHa6EC8VqmhuMpscdfb1XSzvJFKJ+/YZsVLOOf4A5VSFovkIOqKlWraK7A5Adc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JnvxGz5G; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JnvxGz5G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0A8BC4CEE2; Wed, 16 Apr 2025 08:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744793572; bh=RnJXf3yeEkNSvfYLGOSZQdoqPefOM/O6vhN6IFZZRog=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JnvxGz5Gw8Y3CSzJUsLhvzcZ2WzweniBFVo+koHRBmAtFnEhHiQBl+0VeCR48NX6v 4CMyzVEuT8ylK/x1RcCcGGZLCtWEY1Gr5ZgsDqj70JOKVTx1xF4lL01jWmheNPXNfu zQo86iBJJeYH66lT24xKz55/B/RjxkjFs1PqmQqJqJRbai3i0L8U6VUt7sI/9q+DnC 2yUsDskIQCzAa7/FvzA3P/jnTxzDIF/r4aQOB/g3QJgq5AvokDvdidyDenzOYZK7Bs uKDitG5L2XtHW/7DtmxnsTFFUwxpYvBmfPv4YDjM0lKHJu+xk8BiWIN3OSS3QKzEaL c5K5edVPxU9Mg== Date: Wed, 16 Apr 2025 10:52:43 +0200 From: Danilo Krummrich To: Viresh Kumar Cc: "Rafael J. Wysocki" , Miguel Ojeda , Danilo Krummrich , Viresh Kumar , Nishanth Menon , Stephen Boyd , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , linux-pm@vger.kernel.org, Vincent Guittot , rust-for-linux@vger.kernel.org, Manos Pitsidianakis , Alex =?iso-8859-1?Q?Benn=E9e?= , Joakim Bech , Rob Herring , Yury Norov , Burak Emir , Rasmus Villemoes , Russell King , linux-clk@vger.kernel.org, Michael Turquette , linux-kernel@vger.kernel.org Subject: Re: [PATCH V10 14/15] rust: opp: Extend OPP abstractions with cpufreq support Message-ID: References: Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Apr 16, 2025 at 12:09:31PM +0530, Viresh Kumar wrote: > Extend the OPP abstractions to include support for interacting with the > cpufreq core, including the ability to retrieve frequency tables from > OPP table. > > Signed-off-by: Viresh Kumar > --- > rust/kernel/opp.rs | 67 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 67 insertions(+) > > diff --git a/rust/kernel/opp.rs b/rust/kernel/opp.rs > index 44e11808793a..734be8b6d0ef 100644 > --- a/rust/kernel/opp.rs > +++ b/rust/kernel/opp.rs > @@ -19,6 +19,12 @@ > types::{ARef, AlwaysRefCounted, Opaque}, > }; > > +#[cfg(CONFIG_CPU_FREQ)] This config is needed quite often, it probably makes sense to move this code in its own Rust module, i.e.: #[cfg(CONFIG_CPU_FREQ)] pub mod freq;