Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Michael Walle and committed by
Daniel Lezcano
55173287 117bdda2

+4
+4
drivers/thermal/k3_j72xx_bandgap.c
··· 20 20 #include <linux/delay.h> 21 21 #include <linux/slab.h> 22 22 23 + #include "thermal_hwmon.h" 24 + 23 25 #define K3_VTM_DEVINFO_PWR0_OFFSET 0x4 24 26 #define K3_VTM_DEVINFO_PWR0_TEMPSENS_CT_MASK 0xf0 25 27 #define K3_VTM_TMPSENS0_CTRL_OFFSET 0x300 ··· 515 513 ret = PTR_ERR(ti_thermal); 516 514 goto err_free_ref_table; 517 515 } 516 + 517 + devm_thermal_add_hwmon_sysfs(bgp->dev, ti_thermal); 518 518 } 519 519 520 520 platform_set_drvdata(pdev, bgp);