Commit graph

6 commits

Author SHA1 Message Date
Fabio Estevam
2dfef65021 thermal: qoriq: Switch to SPDX identifier
Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2018-08-20 11:32:55 -07:00
Fabio Estevam
1a893a5a19 thermal: qoriq: Simplify the 'site' variable assignment
There is no need to assign zero to the variable 'site' and then
perform a compound bitwise OR operation afterwards.

Make it simpler by assigning the final 'site' value directly.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2018-08-20 11:31:29 -07:00
Fabio Estevam
f1506a69e3 thermal: qoriq: Use devm_thermal_zone_of_sensor_register()
By using the managed devm_thermal_zone_of_sensor_register() we can
drop the explicit call to thermal_zone_of_sensor_unregister() in the
qoriq_tmu_remove() function, which simplifies the code a bit.

So switch to devm_thermal_zone_of_sensor_register().

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2018-08-20 11:29:42 -07:00
Julia Lawall
c30d5d5913 thermal: qoriq: constify thermal_zone_of_device_ops structures
The thermal_zone_of_device_ops structure is only passed as the fourth
argument to thermal_zone_of_sensor_register, which is declared as const.
Thus the thermal_zone_of_device_ops structure itself can be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-08-11 11:38:29 +08:00
Masahiro Yamada
0e77488867 thermal: qoriq: remove useless call for of_thermal_get_trip_points()
Building this driver with W=1 reports:
  warning: variable 'trip' set but not used [-Wunused-but-set-variable]

The call for of_thermal_get_trip_points() is useless.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2017-05-23 20:02:03 -07:00
Jia Hongtao
43528445f6 thermal: qoriq: Add thermal management support
This driver add thermal management support by enabling TMU (Thermal
Monitoring Unit) on QorIQ platform.

It's based on thermal of framework:
- Trip points defined in device tree.
- Cpufreq as cooling device registered in qoriq cpufreq driver.

Signed-off-by: Jia Hongtao <hongtao.jia@nxp.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-09-27 14:02:16 +08:00