[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250910-regulator-remove-dynamic-v3-0-07af4dfa97cc@collabora.com>
Date: Wed, 10 Sep 2025 14:54:30 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>
Cc: linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
Daniel Almeida <daniel.almeida@...labora.com>,
Alexandre Courbot <acourbot@...dia.com>
Subject: [PATCH v3 0/2] rust: regulator: improve the ergonomics of Rust
regulators
This small series comes after some extensive discussion on a few minor
changes that can improve the current Rust regulator API.
Patch 1 removes Regulator<Dynamic>, as we have now established that
there is no usecase that can't use the safer Regulator<Enabled> and
Regulator<Disabled> APIs instead.
Patch 2 makes "devm_regulator_enable_get" and
"devm_regulator_enable_get_optional" available in Rust. This comes after
realizing that a lot of drivers simply care about whether regulators are
enabled for as long as the device is bound.
Signed-off-by: Daniel Almeida <daniel.almeida@...labora.com>
---
Changes in v3:
- Rework the docs (Danilo, Boqun)
- Pick up tags
- Link to v2: https://lore.kernel.org/r/20250908-regulator-remove-dynamic-v2-0-e575ae2cde6a@collabora.com
Changes in v2:
- Picked up tags
- Rebased on regulator/for-next
- Renamed enable() and enable_optional() to devm_enable() and
devm_enable_optional().
- Renamed patch 2/2 to pick up the above change
- Added more docs and links where applicable (thanks, Alex)
- Link to v1: https://lore.kernel.org/r/20250829-regulator-remove-dynamic-v1-0-deb59205e8e9@collabora.com
---
Daniel Almeida (2):
rust: regulator: remove Regulator<Dynamic>
rust: regulator: add devm_enable and devm_enable_optional
rust/helpers/regulator.c | 10 ++++
rust/kernel/regulator.rs | 148 +++++++++++++++++++----------------------------
2 files changed, 70 insertions(+), 88 deletions(-)
---
base-commit: 59e8e7b7f2206d7097e43266722b625715720dfa
change-id: 20250829-regulator-remove-dynamic-f1a6b8c0c1b0
Best regards,
--
Daniel Almeida <daniel.almeida@...labora.com>
Powered by blists - more mailing lists