Lines Matching full:cpufreq
5 //! This module provides rust abstractions for interacting with the cpufreq subsystem.
7 //! C header: [`include/linux/cpufreq.h`](srctree/include/linux/cpufreq.h)
9 //! Reference: <https://docs.kernel.org/admin-guide/pm/cpufreq.html>
54 /// Supports multiple clock domains with per-policy governors in `cpu/cpuN/cpufreq/`.
209 /// use kernel::cpufreq::{Policy, TableIndex};
325 /// use kernel::cpufreq::{TableBuilder, TableIndex};
402 /// use kernel::cpufreq::{DEFAULT_TRANSITION_LATENCY_NS, Policy};
541 /// Gets [`cpumask::Cpumask`] for a cpufreq [`Policy`].
839 /// The following example demonstrates how to register a cpufreq driver.
843 /// cpufreq,
855 /// impl cpufreq::Driver for SampleDriver {
856 /// const NAME: &'static CStr = c"cpufreq-sample";
857 /// const FLAGS: u16 = cpufreq::flags::NEED_INITIAL_FREQ_CHECK | cpufreq::flags::IS_COOLING_DEV;
862 /// fn init(policy: &mut cpufreq::Policy) -> Result<Self::PData> {
867 /// fn exit(_policy: &mut cpufreq::Policy, _data: Option<Self::PData>) -> Result {
871 /// fn suspend(policy: &mut cpufreq::Policy) -> Result {
875 /// fn verify(data: &mut cpufreq::PolicyData) -> Result {
879 /// fn target_index(policy: &mut cpufreq::Policy, index: cpufreq::TableIndex) -> Result {
884 /// fn get(policy: &mut cpufreq::Policy) -> Result<u32> {
897 /// cpufreq::Registration::<SampleDriver>::new_foreign_owned(pdev.as_ref())?;
910 /// SAFETY: Registration with and unregistration from the cpufreq subsystem can happen from any
1035 /// Registers a CPU frequency driver with the cpufreq core.
1037 // We can't use `&Self::VTABLE` directly because the cpufreq core modifies some fields in in new()
1065 /// - This function may only be called from the cpufreq C infrastructure.
1083 /// - This function may only be called from the cpufreq C infrastructure.
1098 /// - This function may only be called from the cpufreq C infrastructure.
1113 /// - This function may only be called from the cpufreq C infrastructure.
1128 /// - This function may only be called from the cpufreq C infrastructure.
1143 /// - This function may only be called from the cpufreq C infrastructure.
1158 /// - This function may only be called from the cpufreq C infrastructure.
1171 /// - This function may only be called from the cpufreq C infrastructure.
1186 /// - This function may only be called from the cpufreq C infrastructure.
1201 /// - This function may only be called from the cpufreq C infrastructure.
1220 /// - This function may only be called from the cpufreq C infrastructure.
1243 /// - This function may only be called from the cpufreq C infrastructure.
1259 /// - This function may only be called from the cpufreq C infrastructure.
1278 /// - This function may only be called from the cpufreq C infrastructure.
1299 /// - This function may only be called from the cpufreq C infrastructure.
1322 /// - This function may only be called from the cpufreq C infrastructure.
1334 /// - This function may only be called from the cpufreq C infrastructure.
1347 /// - This function may only be called from the cpufreq C infrastructure.
1365 /// - This function may only be called from the cpufreq C infrastructure.
1383 /// - This function may only be called from the cpufreq C infrastructure.
1394 /// Unregisters with the cpufreq core.