diff options
author | Huang Rui <ray.huang@amd.com> | 2022-02-22 23:34:20 +0800 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2022-02-22 18:36:44 -0700 |
commit | e3ede97657d8cfc4fd75aecad50269534bb55aed (patch) | |
tree | 7ee09a025a8bb61fba8a554a6228c62e8d3a9bc9 /tools/power/cpupower/lib/cpufreq.h | |
parent | cpupower: Initial AMD P-State capability (diff) | |
download | linux-dev-e3ede97657d8cfc4fd75aecad50269534bb55aed.tar.xz linux-dev-e3ede97657d8cfc4fd75aecad50269534bb55aed.zip |
cpupower: Add the function to get the sysfs value from specific table
Expose the helper into cpufreq header, then cpufreq driver can use this
function to get the sysfs value if it has any specific sysfs interfaces.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r-- | tools/power/cpupower/lib/cpufreq.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/power/cpupower/lib/cpufreq.h b/tools/power/cpupower/lib/cpufreq.h index 95f4fd9e2656..2f3c84035806 100644 --- a/tools/power/cpupower/lib/cpufreq.h +++ b/tools/power/cpupower/lib/cpufreq.h @@ -203,6 +203,18 @@ int cpufreq_modify_policy_governor(unsigned int cpu, char *governor); int cpufreq_set_frequency(unsigned int cpu, unsigned long target_frequency); +/* + * get the sysfs value from specific table + * + * Read the value with the sysfs file name from specific table. Does + * only work if the cpufreq driver has the specific sysfs interfaces. + */ + +unsigned long cpufreq_get_sysfs_value_from_table(unsigned int cpu, + const char **table, + unsigned int index, + unsigned int size); + #ifdef __cplusplus } #endif |