Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal/drivers/mediatek: Add sensors-support

Add HWMON-support to mediateks thermal driver to allow lm-sensors
userspace tools read soc temperature

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210608154530.70074-1-linux@fw-web.de

authored by

Frank Wunderlich and committed by
Daniel Lezcano
24e21d9f acd65d5d

+6
+6
drivers/thermal/mtk_thermal.c
··· 23 23 #include <linux/reset.h> 24 24 #include <linux/types.h> 25 25 26 + #include "thermal_hwmon.h" 27 + 26 28 /* AUXADC Registers */ 27 29 #define AUXADC_CON1_SET_V 0x008 28 30 #define AUXADC_CON1_CLR_V 0x00c ··· 1088 1086 ret = PTR_ERR(tzdev); 1089 1087 goto err_disable_clk_peri_therm; 1090 1088 } 1089 + 1090 + ret = devm_thermal_add_hwmon_sysfs(tzdev); 1091 + if (ret) 1092 + dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs"); 1091 1093 1092 1094 return 0; 1093 1095