Trait kernel::power::Operations
source · [−]pub trait Operations {
type Data: PointerWrapper + Sync + Send;
fn suspend(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result { ... }
fn resume(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result { ... }
fn freeze(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result { ... }
fn restore(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result { ... }
}
Expand description
Corresponds to the kernel’s struct dev_pm_ops
.
It is meant to be implemented by drivers that support power-management operations.
Required Associated Types
type Data: PointerWrapper + Sync + Send
type Data: PointerWrapper + Sync + Send
The type of the context data stored by the driver on each device.
Provided Methods
Called before the system goes into a sleep state.
Called after the system comes back from a sleep state.
Called before creating a hibernation image.