Lines Matching refs:Token
155 /// The associated [`OPP`] is automatically removed when the [`Token`] is dropped.
165 /// use kernel::opp::{Data, MicroVolt, Token};
168 /// fn create_opp(dev: &ARef<Device>, freq: Hertz, volt: MicroVolt, level: u32) -> Result<Token> {
175 pub struct Token {
180 impl Token {
181 /// Dynamically adds an [`OPP`] and returns a [`Token`] that removes it on drop.
193 impl Drop for Token {
214 /// use kernel::opp::{Data, MicroVolt, Token};
217 /// fn create_opp(dev: &ARef<Device>, freq: Hertz, volt: MicroVolt, level: u32) -> Result<Token> {
242 /// Returns a [`Token`] that ensures the OPP is automatically removed
245 pub fn add_opp(self, dev: &ARef<Device>) -> Result<Token> {
246 Token::new(dev, self)