]> git.ipfire.org Git - thirdparty/linux.git/commit
thermal: intel: int340x: Allow temperature override
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Fri, 13 Jun 2025 21:49:23 +0000 (14:49 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 16 Jun 2025 12:03:09 +0000 (14:03 +0200)
commitea78eed7a451375fc8d604bbe3db55be5779eb7d
tree6e0630a321fc5be88f879a4c695ae46ab064217d
parent7954001a769a174f70d770c360fbff0d99dc51d4
thermal: intel: int340x: Allow temperature override

Add debugfs interface to override hardware provide temperature. This
interface can be used primarily for debug. Alternatively this can
be also used to use hardware control loops to manage temperature for
virtual sensors. Virtual sensors are soft sensors created by kernel/
user space aggregating other sensors.

There are three attributes to override the maximum three instances of
platform temperature control.
/sys/kernel/debug/platform_temperature_control/
├── temperature_0
├── temperature_1
└── temperature_2

These are write only attributes requires admin privilege. Any value
greater than 0, will override the temperature. A value of 0 will
stop overriding the temperature.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Link: https://patch.msgid.link/20250613214923.2910397-2-srinivas.pandruvada@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/platform_temperature_control.c