pub struct Adapter<T: Driver>(/* private fields */);Expand description
An adapter for the registration of platform drivers.
Trait Implementations§
Source§impl<T: Driver + 'static> Adapter for Adapter<T>
 
impl<T: Driver + 'static> Adapter for Adapter<T>
Source§type IdInfo = <T as Driver>::IdInfo
 
type IdInfo = <T as Driver>::IdInfo
The type holding driver private data about each device id supported by the driver.
Source§fn of_id_table() -> Option<IdTable<Self::IdInfo>>
 
fn of_id_table() -> Option<IdTable<Self::IdInfo>>
The 
of::IdTable of the corresponding driver.Source§fn acpi_id_table() -> Option<IdTable<Self::IdInfo>>
 
fn acpi_id_table() -> Option<IdTable<Self::IdInfo>>
The 
acpi::IdTable of the corresponding driverSource§fn acpi_id_info(dev: &Device) -> Option<&'static Self::IdInfo>
 
fn acpi_id_info(dev: &Device) -> Option<&'static Self::IdInfo>
Returns the driver’s private data from the matching entry in the 
acpi::IdTable, if any. Read moreSource§fn of_id_info(dev: &Device) -> Option<&'static Self::IdInfo>
 
fn of_id_info(dev: &Device) -> Option<&'static Self::IdInfo>
Returns the driver’s private data from the matching entry in the 
of::IdTable, if any. Read moreSource§impl<T: Driver + 'static> RegistrationOps for Adapter<T>
 
impl<T: Driver + 'static> RegistrationOps for Adapter<T>
Source§type RegType = platform_driver
 
type RegType = platform_driver
The type that holds information about the registration. This is typically a struct defined
by the C portion of the kernel.
Source§unsafe fn register(
    pdrv: &Opaque<Self::RegType>,
    name: &'static CStr,
    module: &'static ThisModule,
) -> Result
 
unsafe fn register( pdrv: &Opaque<Self::RegType>, name: &'static CStr, module: &'static ThisModule, ) -> Result
Registers a driver. Read more
Source§unsafe fn unregister(pdrv: &Opaque<Self::RegType>)
 
unsafe fn unregister(pdrv: &Opaque<Self::RegType>)
Unregisters a driver previously registered with 
RegistrationOps::register. Read moreAuto Trait Implementations§
impl<T> Freeze for Adapter<T>where
    T: Freeze,
impl<T> RefUnwindSafe for Adapter<T>where
    T: RefUnwindSafe,
impl<T> Send for Adapter<T>
impl<T> Sync for Adapter<T>where
    T: Sync,
impl<T> Unpin for Adapter<T>where
    T: Unpin,
impl<T> UnwindSafe for Adapter<T>where
    T: UnwindSafe,
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