Message ID | 20220722165815.1601124-1-l.stach@pengutronix.de |
---|---|
State | New |
Headers | show |
Series | thermal: imx8mm: register with hwmon subsystem | expand |
On 22/07/2022 18:58, Lucas Stach wrote: > Provide standard sensor monitoring via the HWMON subsystem by > registering the sensors with hwmon when CONFIG_THERMAL_HWMON is > enabled. > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > --- Applied, thanks
diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c index af666bd9e8d4..74120edbbdfd 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,10 @@ 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);
Provide standard sensor monitoring via the HWMON subsystem by registering the sensors with hwmon when CONFIG_THERMAL_HWMON is enabled. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> --- drivers/thermal/imx8mm_thermal.c | 5 +++++ 1 file changed, 5 insertions(+)