Lines Matching full:cpufreq
3 //! Rust based implementation of the cpufreq-dt driver.
8 cpu, cpufreq,
38 /// Represents the cpufreq dt device.
54 impl cpufreq::Driver for CPUFreqDTDriver {
55 const NAME: &'static CStr = c_str!("cpufreq-dt");
56 const FLAGS: u16 = cpufreq::flags::NEED_INITIAL_FREQ_CHECK | cpufreq::flags::IS_COOLING_DEV;
61 fn init(policy: &mut cpufreq::Policy) -> Result<Self::PData> { in init()
63 // SAFETY: The CPU device is only used during init; it won't get hot-unplugged. The cpufreq in init()
64 // core registers with CPU notifiers and the cpufreq core/driver won't use the CPU device, in init()
122 transition_latency = cpufreq::DEFAULT_TRANSITION_LATENCY_NS; in init()
151 fn exit(_policy: &mut cpufreq::Policy, _data: Option<Self::PData>) -> Result { in exit()
155 fn online(_policy: &mut cpufreq::Policy) -> Result { in online()
160 fn offline(_policy: &mut cpufreq::Policy) -> Result { in offline()
166 fn suspend(policy: &mut cpufreq::Policy) -> Result { in suspend()
170 fn verify(data: &mut cpufreq::PolicyData) -> Result { in verify()
174 fn target_index(policy: &mut cpufreq::Policy, index: cpufreq::TableIndex) -> Result { in target_index()
183 fn get(policy: &mut cpufreq::Policy) -> Result<u32> { in get()
187 fn set_boost(_policy: &mut cpufreq::Policy, _state: i32) -> Result { in set_boost()
191 fn register_em(policy: &mut cpufreq::Policy) { in register_em()
211 cpufreq::Registration::<CPUFreqDTDriver>::new_foreign_owned(pdev.as_ref())?; in probe()
218 name: "cpufreq-dt",
220 description: "Generic CPUFreq DT driver",