From: Alexander Stein Date: Fri, 6 Mar 2026 13:30:16 +0000 (+0100) Subject: thermal/drivers/imx91: Add hwmon support X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3618f3ca6a6dc5cb185d70626c28836b86e8256;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20260306133017.3189979-1-alexander.stein@ew.tq-group.com Signed-off-by: Daniel Lezcano --- 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 #include +#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;