summaryrefslogtreecommitdiff
path: root/drivers/thermal/amlogic_thermal.c
AgeCommit message (Collapse)AuthorFilesLines
2021-03-10thermal: amlogic: Omit superfluous error message in amlogic_thermal_probe()Tang Bin1-3/+1
The function devm_platform_ioremap_resource has already contains error message, so remove the redundant dev_err here. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210222061105.6008-1-tangbin@cmss.chinamobile.com
2020-11-16thermal: amlogic: Add hwmon supportMartin Blumenstingl1-0/+4
Many monitoring tools read the CPU temperature using the hwmon interface. Expose the thermal sensors on Amlogic boards as hwmon devices. Without this lm_sensors' "sensors" tool does not find any temperature sensors. Now it prints: cpu_thermal-virtual-0 Adapter: Virtual device temp1: +44.7 C (crit = +110.0 C) ddr_thermal-virtual-0 Adapter: Virtual device temp1: +45.9 C (crit = +110.0 C) Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201115190658.631578-1-martin.blumenstingl@googlemail.com
2020-01-27thermal: amlogic: Appease the kernel-doc deityAmit Kucheria1-1/+5
Fix up the following warning when compiled with make W=1: linux.git/drivers/thermal/amlogic_thermal.c:78: warning: Function parameter or member 'A' not described in 'amlogic_thermal_soc_calib_data' linux.git/drivers/thermal/amlogic_thermal.c:78: warning: Function parameter or member 'B' not described in 'amlogic_thermal_soc_calib_data' linux.git/drivers/thermal/amlogic_thermal.c:78: warning: Function parameter or member 'm' not described in 'amlogic_thermal_soc_calib_data' linux.git/drivers/thermal/amlogic_thermal.c:78: warning: Function parameter or member 'n' not described in 'amlogic_thermal_soc_calib_data' Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/139c9191f1a18d528b5f94376facf40291d28244.1574242756.git.amit.kucheria@linaro.org
2019-11-07thermal: amlogic: Add thermal driver to support G12 SoCsGuillaume La Roque1-0/+333
Amlogic G12A and G12B SoCs integrate two thermal sensors with the same design. One is located close to the DDR controller and the other one is located close to the PLLs (between the CPU and GPU). The calibration data for each of the thermal sensors instance is stored in a different location within the AO region. Implement reading the temperature from each thermal sensor. The IP block has more functionality, which may be added to this driver in the future: - chip reset when the temperature exceeds a configurable threshold - up to four interrupts when the temperature has risen above a configurable threshold - up to four interrupts when the temperature has fallen below a configurable threshold Tested-by: Christian Hewitt <christianshewitt@gmail.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20191004090114.30694-3-glaroque@baylibre.com