aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <[email protected]>2025-01-07 07:21:08 +0000
committerViresh Kumar <[email protected]>2025-05-20 05:51:10 +0000
commit2207856ff0bc8d953d6e89bda70b8978c2de8bab (patch)
tree353d3d345dad563f19d2cae0d6f6d2f40dff7f8b /rust/helpers/cpufreq.c
parentrust: opp: Add abstractions for the configuration options (diff)
downloadkernel-2207856ff0bc8d953d6e89bda70b8978c2de8bab.tar.gz
kernel-2207856ff0bc8d953d6e89bda70b8978c2de8bab.zip
rust: cpufreq: Add initial abstractions for cpufreq framework
Introduce initial Rust abstractions for the cpufreq core. This includes basic representations for cpufreq flags, relation types, and the cpufreq table. Signed-off-by: Viresh Kumar <[email protected]>
Diffstat (limited to 'rust/helpers/cpufreq.c')
-rw-r--r--rust/helpers/cpufreq.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/rust/helpers/cpufreq.c b/rust/helpers/cpufreq.c
new file mode 100644
index 000000000000..7c1343c4d65e
--- /dev/null
+++ b/rust/helpers/cpufreq.c
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/cpufreq.h>
+
+#ifdef CONFIG_CPU_FREQ
+void rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *policy)
+{
+ cpufreq_register_em_with_opp(policy);
+}
+#endif