Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§