UPSTREAM: thermal: of-thermal: allow setting trip_temp on hardware
authorWei Ni <wni@nvidia.com>
Tue, 29 Mar 2016 10:29:17 +0000 (18:29 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 31 Mar 2016 07:10:04 +0000 (15:10 +0800)
commit96608532b3ae8e5f9eff99f9a729ad198272f84a
tree7df6d2f7bb2f7a83bbf00fda74788699f9e9a731
parent36e7a60254ed83b21dabfde411ede09d9f7bdfea
UPSTREAM: thermal: of-thermal: allow setting trip_temp on hardware

In current of-thermal, the .set_trip_temp only support to
set trip_temp for SW. But some sensors support to set
trip_temp on hardware, so that can trigger interrupt,
shutdown or any other events.
This patch adds .set_trip_temp() callback in
thermal_zone_of_device_ops{}, so that the sensor device can
use it to set trip_temp on hardware.

Change-Id: I879ea144a9ac21a5032dd885118887b4942c96cf
Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit 60f9ce3ada53498409d51da06502392884933f89)
drivers/thermal/of-thermal.c
include/linux/thermal.h