thermal: Set trip-point temperature via debugfs
authorAlex Frid <afrid@nvidia.com>
Tue, 10 Mar 2015 05:33:58 +0000 (22:33 -0700)
committerBo Yan <byan@nvidia.com>
Thu, 12 Mar 2015 21:25:59 +0000 (14:25 -0700)
commite6fb4cbb1107682d8f549b815e436992ae63aa4f
treed21e610183a3099cdea1aa36b080ac07a2875293
parent27c0e2590462d61a34502e29309a945ad204f132
thermal: Set trip-point temperature via debugfs

Added debugfs interface to set trip-point temperature. It is applied
to any trip-point regardless of "writable" property as long as thermal
zone supports the set operation. This makes it possible to debug effect
of changing temperature even if trip-point should be protected from
modification via thermal core sysfs nodes.

Location:
/sys/kernel/debug/thermal/tz_trip_temperature

Usage example:
"echo 0_1_22000 > /sys/kernel/debug/thermal/tz_trip_temperature"
to set temperature of trip-point 1 in thermal zone 0 to 22C

Change-Id: Ic62b84f9de7601ae36051dafc5408ba19eeccdd0
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/715585
Reviewed-by: Hyungwoo Yang <hyungwooy@nvidia.com>
Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>
drivers/thermal/Makefile
drivers/thermal/thermal_debugfs.c [new file with mode: 0644]