Trait kernel::opp::ConfigOps

source ·
pub trait ConfigOps {
    const USE_VTABLE_ATTR: ();
    const HAS_CONFIG_CLKS: bool = false;
    const HAS_CONFIG_REGULATORS: bool = false;

    // Provided methods
    fn config_clks(
        _dev: &Device,
        _table: &Table,
        _opp: &OPP,
        _scaling_down: bool
    ) -> Result { ... }
    fn config_regulators(
        _dev: &Device,
        _opp_old: &OPP,
        _opp_new: &OPP,
        _data: *mut *mut regulator,
        _count: u32
    ) -> Result { ... }
}
Expand description

OPP configuration callbacks.

Implement this trait to customize OPP clock and regulator setup for your device.

Required Associated Constants§

source

const USE_VTABLE_ATTR: ()

A marker to prevent implementors from forgetting to use #[vtable] attribute when implementing this trait.

Provided Associated Constants§

source

const HAS_CONFIG_CLKS: bool = false

Indicates if the config_clks method is overridden by the implementor.

source

const HAS_CONFIG_REGULATORS: bool = false

Indicates if the config_regulators method is overridden by the implementor.

Provided Methods§

source

fn config_clks( _dev: &Device, _table: &Table, _opp: &OPP, _scaling_down: bool ) -> Result

This is typically used to scale clocks when transitioning between OPPs.

source

fn config_regulators( _dev: &Device, _opp_old: &OPP, _opp_new: &OPP, _data: *mut *mut regulator, _count: u32 ) -> Result

This provides access to the old and new OPPs, allowing for safe regulator adjustments.

Object Safety§

This trait is not object safe.

Implementors§