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>
This commit is contained in:
Alexander Stein 2026-03-06 14:30:16 +01:00 committed by Daniel Lezcano
commit a3618f3ca6

View file

@ -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;