pub trait Operations {
    type Data: ForeignOwnable + Sync + Send;

    fn suspend(_data: <Self::Data as ForeignOwnable>::Borrowed<'_>) -> Result { ... }
    fn resume(_data: <Self::Data as ForeignOwnable>::Borrowed<'_>) -> Result { ... }
    fn freeze(_data: <Self::Data as ForeignOwnable>::Borrowed<'_>) -> Result { ... }
    fn restore(_data: <Self::Data as ForeignOwnable>::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

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.

Called after the system is restored from a hibernation image.

Implementors

This documentation is an old archive. Please see https://rust.docs.kernel.org instead.