Skip to content

Commit a3618f3

Browse files
tq-steinaDaniel Lezcano
authored andcommitted
thermal/drivers/imx91: Add hwmon support
Expose thermal readings as a HWMON device, so that it could be accessed using lm-sensors. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://patch.msgid.link/20260306133017.3189979-1-alexander.stein@ew.tq-group.com Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
1 parent d161cbd commit a3618f3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/thermal/imx91_thermal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <linux/thermal.h>
1818
#include <linux/units.h>
1919

20+
#include "thermal_hwmon.h"
21+
2022
#define REG_SET 0x4
2123
#define REG_CLR 0x8
2224
#define REG_TOG 0xc
@@ -318,6 +320,8 @@ static int imx91_tmu_probe(struct platform_device *pdev)
318320
return dev_err_probe(dev, PTR_ERR(tmu->tzd),
319321
"failed to register thermal zone sensor\n");
320322

323+
devm_thermal_add_hwmon_sysfs(dev, tmu->tzd);
324+
321325
irq = platform_get_irq(pdev, 0);
322326
if (irq < 0)
323327
return irq;

0 commit comments

Comments
 (0)