THERMAL_DEVICE_ENABLED was set during thermal_zone_of_sensor_register().
it cause incorrect temperature reading before tmu initialize.
So, move it after tmu h/w control.
Change-Id: Ic7fe67ff6a29db87a34f8c189ae2c79014befc5f
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
if (sensor_specs.np == sensor_np && id == sensor_id) {
tzd = thermal_zone_of_add_sensor(child, sensor_np,
data, ops);
- if (!IS_ERR(tzd))
- tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED);
of_node_put(sensor_specs.np);
of_node_put(child);
}
exynos_tmu_control(pdev, true);
+
+ if (!IS_ERR(data->tzd))
+ data->tzd->ops->set_mode(data->tzd, THERMAL_DEVICE_ENABLED);
+
return 0;
err_thermal: