All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] thermal: imx8mm: Add hwmon support
@ 2022-04-08 11:09 ` Alexander Stein
  0 siblings, 0 replies; 10+ messages in thread
From: Alexander Stein @ 2022-04-08 11:09 UTC (permalink / raw)
  To: Daniel Lezcano, Rafael J . Wysocki, Amit Kucheria, Zhang Rui,
	Shawn Guo, Sascha Hauer, Fabio Estevam
  Cc: Alexander Stein, linux-pm, linux-arm-kernel

Expose thermal sensors as HWMON devices.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/thermal/imx8mm_thermal.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index af666bd9e8d4..ca8e2c393030 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -16,6 +16,7 @@
 #include <linux/thermal.h>
 
 #include "thermal_core.h"
+#include "thermal_hwmon.h"
 
 #define TER			0x0	/* TMU enable */
 #define TPS			0x4
@@ -176,6 +177,9 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
 			goto disable_clk;
 		}
 		tmu->sensors[i].hw_id = i;
+
+		if (devm_thermal_add_hwmon_sysfs(tmu->sensors[i].tzd))
+			dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
 	}
 
 	platform_set_drvdata(pdev, tmu);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-05-11 10:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 11:09 [PATCH 1/2] thermal: imx8mm: Add hwmon support Alexander Stein
2022-04-08 11:09 ` Alexander Stein
2022-04-08 11:09 ` [PATCH 2/2] thermal/drivers/thermal_helpers: Adjust output format Alexander Stein
2022-04-08 11:09   ` Alexander Stein
2022-04-14  7:35   ` Daniel Lezcano
2022-04-14  7:35     ` Daniel Lezcano
2022-05-10 22:48     ` Nitin Garg
2022-05-10 22:48       ` Nitin Garg
2022-05-11 10:17       ` (EXT) " Alexander Stein
2022-05-11 10:17         ` Alexander Stein

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.