pub struct UnregisteredChip<'a, T: PwmOps> { /* private fields */ }Expand description
A wrapper around ARef<Chip<T>> that ensures that register can only be called once.
Implementations§
Source§impl<T: PwmOps> UnregisteredChip<'_, T>
impl<T: PwmOps> UnregisteredChip<'_, T>
Sourcepub fn register(self) -> Result<ARef<Chip<T>>>
pub fn register(self) -> Result<ARef<Chip<T>>>
Registers a PWM chip with the PWM subsystem.
Transfers its ownership to the devres framework, which ties its lifetime
to the parent device.
On unbind of the parent device, the devres entry will be dropped, automatically
calling pwmchip_remove. This function should be called from the driver’s probe.
Methods from Deref<Target = Chip<T>>§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for UnregisteredChip<'a, T>
impl<'a, T> !RefUnwindSafe for UnregisteredChip<'a, T>
impl<'a, T> !Send for UnregisteredChip<'a, T>
impl<'a, T> !Sync for UnregisteredChip<'a, T>
impl<'a, T> !Unpin for UnregisteredChip<'a, T>
impl<'a, T> !UnwindSafe for UnregisteredChip<'a, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot. Read more