Commit de95d134 authored by Alexander Stein's avatar Alexander Stein Committed by Daniel Lezcano

thermal/drivers/imx8mm: Add hwmon support

Expose thermal sensors as HWMON devices.
Signed-off-by: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20220726122331.323093-1-alexander.stein@ew.tq-group.comSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@kernel.org>
parent 6f894164
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment