summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@ew.tq-group.com>2022-07-26 14:23:31 +0200
committerDaniel Lezcano <daniel.lezcano@kernel.org>2022-12-14 15:25:40 +0100
commitde95d1341a3e682b95ad759bd58b86224819fbec (patch)
tree52dcc2d93de3279bc61629fc119bce7c08779c62 /drivers/thermal
parent6f8941646234e2d6e589377aea0dd1ba52365623 (diff)
thermal/drivers/imx8mm: Add hwmon support
Expose thermal sensors as HWMON devices. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20220726122331.323093-1-alexander.stein@ew.tq-group.com Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/imx8mm_thermal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index e709c03bc4b9..d247b48696cb 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -18,6 +18,7 @@
#include <linux/thermal.h>
#include "thermal_core.h"
+#include "thermal_hwmon.h"
#define TER 0x0 /* TMU enable */
#define TPS 0x4
@@ -342,6 +343,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);