Lines Matching full:enabled
31 impl Sealed for super::Enabled {}
41 /// A state where the [`Regulator`] is known to be enabled.
45 pub struct Enabled;
48 /// underlying regulator to be enabled. This means that this reference does not
52 impl RegulatorState for Enabled {
60 /// A trait that abstracts the ability to check if a [`Regulator`] is enabled.
79 /// cares about the regulator being enabled.
114 /// This example uses [`Regulator<Enabled>`], which is suitable for drivers that
118 /// These users can store [`Regulator<Enabled>`] directly in their driver's
125 /// # use kernel::regulator::{Voltage, Regulator, Disabled, Enabled};
138 /// // From now on, the regulator is known to be enabled because of the type
139 /// // `Enabled`.
143 /// let regulator: Regulator<Enabled> =
152 /// // Dropping an enabled regulator will disable it. The refcount will be
169 /// # use kernel::regulator::{Voltage, Regulator, Enabled};
172 /// let regulator: Regulator<Enabled> = Regulator::<Enabled>::get(dev, c_str!("vcc"))?;
174 /// // Dropping an enabled regulator will disable it. The refcount will be
212 /// # use kernel::regulator::{Regulator, Enabled, Disabled};
213 /// fn disable(dev: &Device, regulator: Regulator<Enabled>) -> Result {
214 /// // We can also disable an enabled regulator without reliquinshing our
300 /// Attempts to convert the regulator to an enabled state.
301 pub fn try_into_enabled(self) -> Result<Regulator<Enabled>, Error<Disabled>> {
303 // `Regulator<Enabled>`.
319 impl Regulator<Enabled> {
330 pub fn try_into_disabled(self) -> Result<Regulator<Disabled>, Error<Enabled>> {
349 /// Checks if the regulator is enabled.
360 // reference on the enabled refcount, so it is safe to relinquish it