aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/qoriq_thermal.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-08-28thermal: qoriq: Use __maybe_unused instead of #if CONFIG_PM_SLEEPAnson Huang1-4/+2
Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simply the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2019-08-28thermal: qoriq: Use devm_platform_ioremap_resource() instead of of_iomap()Anson Huang1-12/+6
Use devm_platform_ioremap_resource() instead of of_iomap() to save the iounmap() call in error handle path; Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2019-08-28thermal: qoriq: Fix error path of calling qoriq_tmu_register_tmu_zone failAnson Huang1-1/+1
When registering tmu zone failed, the error path should be err_tmu instead of err_iomap, as iounmap() needs to be called. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2019-08-28thermal: qoriq: Add clock operationsAnson Huang1-0/+23
Some platforms like i.MX8MQ has clock control for this module, need to add clock operations to make sure the driver is working properly. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2019-05-14thermal: qoriq: Remove unnecessary DT node is NULL checkAndrey Smirnov1-5/+0
It's impossible to use this driver outside of Device Tree, so if the probe function is called, the dev.of_node is guaranteed to not be NULL and guarding against that is pointless. Drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Chris Healy <cphealy@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Angus Ainslie (Purism) <angus@akkea.ca> Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2019-02-05thermal: qoriq: add multiple sensors supportYuantian Tang1-57/+47
The QorIQ Layerscape SoC has several thermal sensors but the current driver only supports one. Massage the code to be sensor oriented and allow the support for multiple sensors. Signed-off-by: Yuantian Tang <andy.tang@nxp.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2018-10-26Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermalLinus Torvalds1-2/+3
Pull thermal SoC updates from Eduardo Valentin: "Several new things coming up. Specifics: - Rework of tsens and hisi thermal drivers - OF-thermal now allows sharing multiple cooling devices on maps - Added support for r8a7744 and R8A77970 on rcar thermal driver - Added support for r8a774a1 on rcar_gen3 thermal driver - New thermal driver stm32 - Fixes on multiple thermal drivers: of-thermal, imx, qoriq, armada, qcom-spmi, rcar, da9062/61" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: (41 commits) thermal: da9062/61: Prevent hardware access during system suspend thermal: rcar_thermal: Prevent doing work after unbind thermal: rcar_thermal: Prevent hardware access during system suspend thermal: rcar_gen3_thermal: add R8A77980 support dt-bindings: thermal: rcar-gen3-thermal: document R8A77980 bindings thermal: add stm32 thermal driver dt-bindings: stm32-thermal: add binding documentation thermal: rcar_thermal: add R8A77970 support dt-bindings: thermal: rcar-thermal: document R8A77970 bindings thermal: rcar_thermal: fix duplicate IRQ request dt-bindings: thermal: rcar: Add device tree support for r8a7744 thermal/drivers/hisi: Add the dual clusters sensors for hi3660 thermal/drivers/hisi: Add more sensors channel thermal/drivers/hisi: Remove pointless irq field thermal/drivers/hisi: Use platform_get_irq_byname thermal/drivers/hisi: Replace macro name with relevant sensor location thermal/drivers/hisi: Add multiple sensors support thermal/drivers/hisi: Prepare to support multiple sensors thermal/drivers/hisi: Factor out the probe functions thermal/drivers/hisi: Set the thermal zone private data to the sensor pointer ...
2018-10-22thermal: qoriq: add i.mx8mq supportAnson Huang1-0/+1
Add i.mx8mq specific compatible string. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2018-10-22thermal: Convert to using %pOFn instead of device_node.nameRob Herring1-2/+2
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: linux-pm@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2018-08-20thermal: qoriq: Switch to SPDX identifierFabio Estevam1-13/+3
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-20thermal: qoriq: Simplify the 'site' variable assignmentFabio Estevam1-2/+2
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-20thermal: qoriq: Use devm_thermal_zone_of_sensor_register()Fabio Estevam1-4/+3
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>
2017-08-11thermal: qoriq: constify thermal_zone_of_device_ops structuresJulia Lawall1-1/+1
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-05-23thermal: qoriq: remove useless call for of_thermal_get_trip_points()Masahiro Yamada1-3/+0
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>
2016-09-27thermal: qoriq: Add thermal management supportJia Hongtao1-0/+328
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>