Skip to contentSkip to conversation

pm: cpupower: Add header changes for cpufreq.h to SWIG bindings

PATCH In review John B. Wyatt IV 2 participants 2 messages Dec 24, 2024 – Dec 26, 2024 CPU power monitoring

lore
Share & tools
lore

John B. Wyatt IV

author maintainer
#0 lore raw

PATCH 1/1 pm: cpupower: Add header changes for cpufreq.h to SWIG bindings

"cpupower: Add support for showing energy performance preference" added two new functions to cpufreq.h. This patch adds them to the bindings.

Tested by compiling both libcpupower and the headers; running the test script that does not use the functions as a basic sanity test.

---
 tools/power/cpupower/bindings/python/raw_pylibcpupower.swg | 3 +++
 1 file changed, 3 insertions(+)
tools/power/cpupower/bindings/python/raw_pylibcpupower.swg +3 -0
index 96556d87a745..a8226c79cfea 100644
@@ -134,6 +134,9 @@ void cpufreq_put_stats(struct cpufreq_stats *stats);
 
 unsigned long cpufreq_get_transitions(unsigned int cpu);
 
+char *cpufreq_get_energy_performance_preference(unsigned int cpu);
+void cpufreq_put_energy_performance_preference(char *ptr);
+
 int cpufreq_set_policy(unsigned int cpu, struct cpufreq_policy *policy);
 
 int cpufreq_modify_policy_min(unsigned int cpu, unsigned long min_freq);
Signature · 1 line
2.47.1
maintainer
#1 lore raw
Quoted 11 lines · John B. Wyatt IV

"cpupower: Add support for showing energy performance preference" added two new functions to cpufreq.h. This patch adds them to the bindings.

Tested by compiling both libcpupower and the headers; running the test script that does not use the functions as a basic sanity test.

---

Thank for the patch. Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/?h=cpupower

This patch will be included in the 6.14-rc1 pull request to Rafael.

thanks,
-- Shuah