[PATCH 1/1] thermal/drivers/imx91: Add hwmon support

From: Alexander Stein

Date: Fri Mar 06 2026 - 08:40:28 EST


Expose thermal readings as a HWMON device, so that it could be
accessed using lm-sensors.

Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
---
drivers/thermal/imx91_thermal.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/thermal/imx91_thermal.c b/drivers/thermal/imx91_thermal.c
index 9b20be03d6dec..25915bb702bea 100644
--- a/drivers/thermal/imx91_thermal.c
+++ b/drivers/thermal/imx91_thermal.c
@@ -17,6 +17,8 @@
#include <linux/thermal.h>
#include <linux/units.h>

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

+ devm_thermal_add_hwmon_sysfs(dev, tmu->tzd);
+
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
--
2.43.0