diff options
author | Ranganath Krishnan <ranganath@ti.com> | 2013-08-23 11:08:22 -0500 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-03-20 17:41:56 +0900 |
commit | 2c61f85607b4c5bcca2220e91d6ded7c96b978e2 (patch) | |
tree | c9eb12216ed8924ab96ed1785ec48f1df0a881d6 /drivers/thermal | |
parent | e6b246f010994c09512b2b029ae9088fc74f40be (diff) | |
download | linux-3.10-2c61f85607b4c5bcca2220e91d6ded7c96b978e2.tar.gz linux-3.10-2c61f85607b4c5bcca2220e91d6ded7c96b978e2.tar.bz2 linux-3.10-2c61f85607b4c5bcca2220e91d6ded7c96b978e2.zip |
thermal: ti-soc-thermal: Set the bandgap mask counter delay value
Set the bandgap mask counter_delay with the polling_delay value on
registering the thermal zone. This patch will ensure to get the
correct update interval for computing the thermal trend.
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c index 4c5f55c3734..4f8b9af54a5 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c @@ -174,6 +174,9 @@ static int ti_thermal_set_mode(struct thermal_zone_device *thermal, enum thermal_device_mode mode) { struct ti_thermal_data *data = thermal->devdata; + struct ti_bandgap *bgp; + + bgp = data->bgp; if (!data->ti_thermal) { dev_notice(&thermal->device, "thermal zone not registered\n"); @@ -190,6 +193,8 @@ static int ti_thermal_set_mode(struct thermal_zone_device *thermal, mutex_unlock(&data->ti_thermal->lock); data->mode = mode; + ti_bandgap_write_update_interval(bgp, data->sensor_id, + data->ti_thermal->polling_delay); thermal_zone_device_update(data->ti_thermal); dev_dbg(&thermal->device, "thermal polling set for duration=%d msec\n", data->ti_thermal->polling_delay); @@ -313,6 +318,8 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, } data->ti_thermal->polling_delay = FAST_TEMP_MONITORING_RATE; ti_bandgap_set_sensor_data(bgp, id, data); + ti_bandgap_write_update_interval(bgp, data->sensor_id, + data->ti_thermal->polling_delay); return 0; } |