]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal: intel: int340x: Add support for power slider
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 25 Aug 2025 13:23:12 +0000 (06:23 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Aug 2025 13:44:47 +0000 (15:44 +0200)
commit0d50f4d6ec5a8fedfd7169417b25672cadd0e652
tree91888286f097924928bf1b913d4c670fbad00a47
parent3d9ab61f53cdf72fed737c66652a8aad9d27504c
thermal: intel: int340x: Add support for power slider

Add support for system wide energy performance preference using a SoC
slider interface defined via processor thermal PCI device MMIO space.

Using Linux platform-profile class API, register a new platform profile.
Provide three platform power profile choices:
"performance", "balanced" and "low-power".

Profile sysfs is located at:
/sys/class/platform-profile/platform-profile-*
where attribute "name" is presented as "SoC Power Slider".

At boot by default the slider is set to balanced mode. This profile is
changed by user space based on user preference via power profile daemon
or directly writing to the "profile" sysfs attribute.

Add a CPU model specific processor thermal device feature
PROC_THERMAL_FEATURE_SOC_POWER_SLIDER. When enabled for a CPU model,
slider interface is registered.

During system suspend callback save slider register and restore during
resume callback.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20250825132315.75521-2-srinivas.pandruvada@linux.intel.com
[ rjw: Removal of redundant outer parens from one expression ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/Kconfig
drivers/thermal/intel/int340x_thermal/Makefile
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c
drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider.c [new file with mode: 0644]