Skip to content

Commit 24e21d9

Browse files
frank-wdlezcano
authored andcommitted
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 <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent acd65d5 commit 24e21d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/thermal/mtk_thermal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include <linux/reset.h>
2424
#include <linux/types.h>
2525

26+
#include "thermal_hwmon.h"
27+
2628
/* AUXADC Registers */
2729
#define AUXADC_CON1_SET_V 0x008
2830
#define AUXADC_CON1_CLR_V 0x00c
@@ -1087,6 +1089,10 @@ static int mtk_thermal_probe(struct platform_device *pdev)
10871089
goto err_disable_clk_peri_therm;
10881090
}
10891091

1092+
ret = devm_thermal_add_hwmon_sysfs(tzdev);
1093+
if (ret)
1094+
dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs");
1095+
10901096
return 0;
10911097

10921098
err_disable_clk_peri_therm:

0 commit comments

Comments
 (0)