[PATCH v6 1/8] regulator: core: Add "enable and wait" functions

Mark Brown broonie at kernel.org
Mon Oct 5 10:09:27 PDT 2026


On Tue, Sep 01, 2026 at 03:49:19PM +0800, Chen-Yu Tsai wrote:
> In device power sequencing and initialization use cases, it is common
> for the driver to enable the regulator and then wait for a certain
> period of time to pass before continuing.

This breaks the build:

make --silent --keep-going --jobs=15 O=/build/stage/build-work ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_COMPAT=arm-linux-gnueabihf-
error[E0425]: cannot find function `regulator_enable` in crate `bindings`
      --> /build/stage/linux/rust/kernel/regulator.rs:288:38
       |
   288 |         to_result(unsafe { bindings::regulator_enable(self.inner) })
       |                                      ^^^^^^^^^^^^^^^^
       |
      ::: /build/stage/build-work/rust/bindings/bindings_generated.rs:129557:5
       |
129557 |     pub fn regulator_disable(regulator: *mut regulator) -> ffi::c_int;
       |     ------------------------------------------------------------------ similarly named function `regulator_disable` defined here
       |
help: a function with a similar name exists
       |
   288 -         to_result(unsafe { bindings::regulator_enable(self.inner) })
   288 +         to_result(unsafe { bindings::regulator_disable(self.inner) })
       |

error: aborting due to 1 previous error

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20261005/0125bd78/attachment.sig>


More information about the Linux-mediatek mailing list