rust: regulator: add a bare minimum regulator abstraction
authorDaniel Almeida <daniel.almeida@collabora.com>
Mon, 14 Jul 2025 18:52:04 +0000 (15:52 -0300)
committerMark Brown <broonie@kernel.org>
Tue, 15 Jul 2025 14:07:40 +0000 (15:07 +0100)
commit9b614ceada7cb846de1a1c3bb0b29b0a2726ef45
treec566bfa7567c3f67fdca460f2031c25d36cf3643
parent347e9f5043c89695b01e66b3ed111755afcf1911
rust: regulator: add a bare minimum regulator abstraction

Add a bare minimum regulator abstraction to be used by Rust drivers.
This abstraction adds a small subset of the regulator API, which is
thought to be sufficient for the drivers we have now.

Regulators provide the power needed by many hardware blocks and thus are
likely to be needed by a lot of drivers.

It was tested on rk3588, where it was used to power up the "mali"
regulator in order to power up the GPU.

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20250714-topics-tyr-regulator2-v8-1-c7ab3955d524@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
rust/bindings/bindings_helper.h
rust/helpers/helpers.c
rust/helpers/regulator.c [new file with mode: 0644]
rust/kernel/lib.rs
rust/kernel/regulator.rs [new file with mode: 0644]