Re: [PATCH v7 1/2] rust: regulator: add a bare minimum regulator abstraction
From: Daniel Almeida
Date: Mon Jul 07 2025 - 12:24:35 EST
[…]
> All errors (new ones prefixed by >>):
>
>>> error[E0425]: cannot find function `regulator_set_voltage` in crate `bindings`
> --> rust/kernel/regulator.rs:258:23
> |
> 258 | bindings::regulator_set_voltage(self.inner.as_ptr(), min_uv.0, max_uv.0)
> | ^^^^^^^^^^^^^^^^^^^^^ not found in `bindings`
> --
>>> error[E0425]: cannot find function `regulator_get_voltage` in crate `bindings`
> --> rust/kernel/regulator.rs:265:42
> |
> 265 | let voltage = unsafe { bindings::regulator_get_voltage(self.inner.as_ptr()) };
> | ^^^^^^^^^^^^^^^^^^^^^ not found in `bindings`
> --
>>> error[E0425]: cannot find function `regulator_get` in crate `bindings`
> --> rust/kernel/regulator.rs:276:53
> |
> 276 | let inner = from_err_ptr(unsafe { bindings::regulator_get(dev.as_raw(), name.as_ptr()) })?;
> | ^^^^^^^^^^^^^ not found in `bindings`
> --
>>> error[E0425]: cannot find function `regulator_enable` in crate `bindings`
> --> rust/kernel/regulator.rs:290:38
> |
> 290 | to_result(unsafe { bindings::regulator_enable(self.inner.as_ptr()) })
> | ^^^^^^^^^^^^^^^^ not found in `bindings`
> --
>>> error[E0425]: cannot find function `regulator_disable` in crate `bindings`
> --> rust/kernel/regulator.rs:295:38
> |
> 295 | to_result(unsafe { bindings::regulator_disable(self.inner.as_ptr()) })
> | ^^^^^^^^^^^^^^^^^ not found in `bindings`
> --
>>> error[E0425]: cannot find function `regulator_is_enabled` in crate `bindings`
> --> rust/kernel/regulator.rs:379:28
> |
> 379 | unsafe { bindings::regulator_is_enabled(self.inner.as_ptr()) != 0 }
> | ^^^^^^^^^^^^^^^^^^^^ not found in `bindings`
> --
>>> error[E0425]: cannot find function `regulator_disable` in crate `bindings`
> --> rust/kernel/regulator.rs:389:32
> |
> 389 | unsafe { bindings::regulator_disable(self.inner.as_ptr()) };
> | ^^^^^^^^^^^^^^^^^ not found in `bindings`
> --
>>> error[E0425]: cannot find function `regulator_put` in crate `bindings`
> --> rust/kernel/regulator.rs:393:28
> |
> 393 | unsafe { bindings::regulator_put(self.inner.as_ptr()) };
> | ^^^^^^^^^^^^^ not found in `bindings`
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
I think these need to be in rust/helpers if CONFIG_REGULATOR is not set,
because the stubs are inline functions. I will try this on the next iteration.