From e7ebdf7eee0366c986bb4264ce03daf2cf7d15a3 Mon Sep 17 00:00:00 2001 From: Hyungwoo Yang Date: Wed, 2 Jan 2013 16:51:53 -0800 Subject: drivers: misc: therm_est: enable run-time trip point change Enabled trip point change through sysFs during run-time. Change-Id: Ibbdd8759cf24033575eda1d5f49b4d736060dab5 Signed-off-by: Hyungwoo Yang Reviewed-on: http://git-master/r/188136 --- drivers/misc/therm_est.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/misc/therm_est.c b/drivers/misc/therm_est.c index 654b0f675..553764d66 100644 --- a/drivers/misc/therm_est.c +++ b/drivers/misc/therm_est.c @@ -1,7 +1,7 @@ /* * drivers/misc/therm_est.c * - * Copyright (C) 2010-2012 NVIDIA Corporation. + * Copyright (C) 2010-2013 NVIDIA Corporation. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -129,6 +129,17 @@ static int therm_est_get_trip_temp(struct thermal_zone_device *thz, return 0; } +static int therm_est_set_trip_temp(struct thermal_zone_device *thz, + int trip, + unsigned long temp) +{ + struct therm_estimator *est = thz->devdata; + + est->trip_temp = temp; + + return 0; +} + static int therm_est_get_temp(struct thermal_zone_device *thz, unsigned long *temp) { @@ -142,6 +153,7 @@ static struct thermal_zone_device_ops therm_est_ops = { .unbind = therm_est_unbind, .get_trip_type = therm_est_get_trip_type, .get_trip_temp = therm_est_get_trip_temp, + .set_trip_temp = therm_est_set_trip_temp, .get_temp = therm_est_get_temp, }; -- cgit v1.2.2