[PATCH] pm: cpupower: Add missing residency header changes in cpuidle.h to SWIG

From: John B. Wyatt IV
Date: Wed Jan 08 2025 - 17:19:43 EST


"tools/cpupower: display residency value in idle-info" added a new
function to cpuidle.h. This patch adds them to the bindings.

Link: https://lore.kernel.org/linux-pm/20240809083728.266697-1-aboorvad@xxxxxxxxxxxxx/

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

Signed-off-by: "John B. Wyatt IV" <jwyatt@xxxxxxxxxx>
Signed-off-by: "John B. Wyatt IV" <sageofredondo@xxxxxxxxx>
---
tools/power/cpupower/bindings/python/raw_pylibcpupower.swg | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg b/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
index a8226c79cfea..d82af6fa93c3 100644
--- a/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
+++ b/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
@@ -163,6 +163,8 @@ int cpuidle_state_disable(unsigned int cpu, unsigned int idlestate,
unsigned int disable);
unsigned long cpuidle_state_latency(unsigned int cpu,
unsigned int idlestate);
+unsigned long cpuidle_state_residency(unsigned int cpu,
+ unsigned int idlestate);
unsigned long cpuidle_state_usage(unsigned int cpu,
unsigned int idlestate);
unsigned long long cpuidle_state_time(unsigned int cpu,
--
2.47.1