linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] rust: regulator: improve the ergonomics of Rust regulators
@ 2025-08-29 21:11 Daniel Almeida
  2025-08-29 21:11 ` [PATCH 1/2] rust: regulator: remove Regulator<Dynamic> Daniel Almeida
  2025-08-29 21:11 ` [PATCH 2/2] rust: regulator: add devm_regulator_get_enable API Daniel Almeida
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Almeida @ 2025-08-29 21:11 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Miguel Ojeda, Alex Gaynor, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, Danilo Krummrich
  Cc: linux-kernel, rust-for-linux, Daniel Almeida

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@collabora.com>
---
Daniel Almeida (2):
      rust: regulator: remove Regulator<Dynamic>
      rust: regulator: add devm_regulator_get_enable API

 rust/helpers/regulator.c |  10 ++++
 rust/kernel/regulator.rs | 130 +++++++++++++++--------------------------------
 2 files changed, 52 insertions(+), 88 deletions(-)
---
base-commit: 1b237f190eb3d36f52dffe07a40b5eb210280e00
change-id: 20250829-regulator-remove-dynamic-f1a6b8c0c1b0

Best regards,
-- 
Daniel Almeida <daniel.almeida@collabora.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-09-02  7:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 21:11 [PATCH 0/2] rust: regulator: improve the ergonomics of Rust regulators Daniel Almeida
2025-08-29 21:11 ` [PATCH 1/2] rust: regulator: remove Regulator<Dynamic> Daniel Almeida
2025-08-30  5:21   ` Alexandre Courbot
2025-08-30 13:33   ` Danilo Krummrich
2025-09-02  7:53   ` Alice Ryhl
2025-08-29 21:11 ` [PATCH 2/2] rust: regulator: add devm_regulator_get_enable API Daniel Almeida
2025-08-30  5:20   ` Alexandre Courbot
2025-08-30 13:13     ` Daniel Almeida
2025-08-30 13:38       ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).