Lines Matching full:enabled
34 impl Sealed for super::Enabled {} implementation
44 /// A state where the [`Regulator`] is known to be enabled.
48 pub struct Enabled; struct
51 /// underlying regulator to be enabled. This means that this reference does not
55 impl RegulatorState for Enabled { implementation
63 /// A trait that abstracts the ability to check if a [`Regulator`] is enabled.
82 /// cares about the regulator being enabled.
119 /// This example uses [`Regulator<Enabled>`], which is suitable for drivers that
123 /// These users can store [`Regulator<Enabled>`] directly in their driver's
129 /// # use kernel::regulator::{Voltage, Regulator, Disabled, Enabled};
142 /// // From now on, the regulator is known to be enabled because of the type
143 /// // `Enabled`.
147 /// let regulator: Regulator<Enabled> =
156 /// // Dropping an enabled regulator will disable it. The refcount will be
172 /// # use kernel::regulator::{Voltage, Regulator, Enabled};
175 /// let regulator: Regulator<Enabled> = Regulator::<Enabled>::get(dev, c"vcc")?;
177 /// // Dropping an enabled regulator will disable it. The refcount will be
214 /// # use kernel::regulator::{Regulator, Enabled, Disabled};
215 /// fn disable(dev: &Device, regulator: Regulator<Enabled>) -> Result {
216 /// // We can also disable an enabled regulator without reliquinshing our
303 /// Attempts to convert the regulator to an enabled state.
304 pub fn try_into_enabled(self) -> Result<Regulator<Enabled>, Error<Disabled>> { in try_into_enabled() argument
306 // `Regulator<Enabled>`. in try_into_enabled()
322 impl Regulator<Enabled> {
333 pub fn try_into_disabled(self) -> Result<Regulator<Disabled>, Error<Enabled>> { in try_into_disabled() argument
352 /// Checks if the regulator is enabled.
363 // reference on the enabled refcount, so it is safe to relinquish it in drop()