diff options
| author | Sumit Gupta <sumitg@nvidia.com> | 2026-01-20 20:26:15 +0530 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-01-28 19:10:50 +0100 |
| commit | 4a1cf5ed51b1b6049d7771d2e77789b99dafc8ae (patch) | |
| tree | e178ccbb389e03bb17e73c9134dcce373fbe31a4 /include | |
| parent | b753c3204d7b0e9bef956b64425709a9c40246fe (diff) | |
cpufreq: CPPC: Add generic helpers for sysfs show/store
Add generic helper functions for u64 sysfs attributes that follow the
common pattern of calling CPPC get/set APIs:
- cppc_cpufreq_sysfs_show_u64(): reads value and handles -EOPNOTSUPP
- cppc_cpufreq_sysfs_store_u64(): parses input and calls set function
Add CPPC_CPUFREQ_ATTR_RW_U64() macro to generate show/store functions
using these helpers, reducing boilerplate for simple attributes.
Convert auto_act_window and energy_performance_preference_val to use
the new macro.
No functional changes.
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
[ rjw: Retained empty code line after a conditional ]
Link: https://patch.msgid.link/20260120145623.2959636-2-sumitg@nvidia.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
