Skip to content

Commit de95d13

Browse files
tq-steinaDaniel Lezcano
authored andcommitted
thermal/drivers/imx8mm: Add hwmon support
Expose thermal sensors as HWMON devices. Signed-off-by: Alexander Stein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 6f89416 commit de95d13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/thermal/imx8mm_thermal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/thermal.h>
1919

2020
#include "thermal_core.h"
21+
#include "thermal_hwmon.h"
2122

2223
#define TER 0x0 /* TMU enable */
2324
#define TPS 0x4
@@ -342,6 +343,9 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
342343
goto disable_clk;
343344
}
344345
tmu->sensors[i].hw_id = i;
346+
347+
if (devm_thermal_add_hwmon_sysfs(tmu->sensors[i].tzd))
348+
dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
345349
}
346350

347351
platform_set_drvdata(pdev, tmu);

0 commit comments

Comments
 (0)