Skip to content

Commit 5517328

Browse files
mwalledlezcano
authored andcommitted
thermal/drivers/k3_j72xx_bandgap: Register sensors with hwmon
Make the sensors available in the hwmon subsystem (if CONFIG_THERMAL_HWMON is enabled). Signed-off-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://lore.kernel.org/r/20250828124042.1680853-1-mwalle@kernel.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent 117bdda commit 5517328

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/thermal/k3_j72xx_bandgap.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include <linux/delay.h>
2121
#include <linux/slab.h>
2222

23+
#include "thermal_hwmon.h"
24+
2325
#define K3_VTM_DEVINFO_PWR0_OFFSET 0x4
2426
#define K3_VTM_DEVINFO_PWR0_TEMPSENS_CT_MASK 0xf0
2527
#define K3_VTM_TMPSENS0_CTRL_OFFSET 0x300
@@ -513,6 +515,8 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
513515
ret = PTR_ERR(ti_thermal);
514516
goto err_free_ref_table;
515517
}
518+
519+
devm_thermal_add_hwmon_sysfs(bgp->dev, ti_thermal);
516520
}
517521

518522
platform_set_drvdata(pdev, bgp);

0 commit comments

Comments
 (0)