Commit a3618f3c authored by Alexander Stein's avatar Alexander Stein Committed by Daniel Lezcano
Browse files

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: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
Link: https://patch.msgid.link/20260306133017.3189979-1-alexander.stein@ew.tq-group.com


Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@kernel.org>
parent d161cbd6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;