diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2015-01-19 06:44:04 -0500 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2015-01-21 00:09:52 -0500 |
commit | 528012c1f4379738c6307b273d20cc3caa7d08af (patch) | |
tree | 934e1772dba8f022374e3c9bd2a2b0ae148bcd64 /drivers/thermal | |
parent | b97f880c8342fd6e49a02c9ef7507a678722b2b3 (diff) |
thermal: of: Enable thermal_zoneX when sensor is correctly added
Up till now the thermal_zone mode was by default "disabled". With this
patch the default behavior was changed to "enable".
One can read the mode at:
/sys/class/thermal/thermal_zone0/mode
Tested-by: Javi Merino <javi.merino@arm.com>
Reported-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/of-thermal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index d717f3dab6f1..668fb1bdea9e 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c | |||
@@ -497,6 +497,9 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, | |||
497 | if (sensor_specs.np == sensor_np && id == sensor_id) { | 497 | if (sensor_specs.np == sensor_np && id == sensor_id) { |
498 | tzd = thermal_zone_of_add_sensor(child, sensor_np, | 498 | tzd = thermal_zone_of_add_sensor(child, sensor_np, |
499 | data, ops); | 499 | data, ops); |
500 | if (!IS_ERR(tzd)) | ||
501 | tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); | ||
502 | |||
500 | of_node_put(sensor_specs.np); | 503 | of_node_put(sensor_specs.np); |
501 | of_node_put(child); | 504 | of_node_put(child); |
502 | goto exit; | 505 | goto exit; |