pub struct Data(/* private fields */);
Expand description
OPP data.
Rust abstraction for the C struct dev_pm_opp_data
, used to define operating performance
points (OPPs) dynamically.
§Examples
The following example demonstrates how to create an OPP
with Data
.
use kernel::clk::Hertz;
use kernel::device::Device;
use kernel::error::Result;
use kernel::opp::{Data, MicroVolt, Token};
use kernel::types::ARef;
fn create_opp(dev: &ARef<Device>, freq: Hertz, volt: MicroVolt, level: u32) -> Result<Token> {
let data = Data::new(freq, volt, level, false);
// OPP is removed once token goes out of scope.
data.add_opp(dev)
}
Implementations§
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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