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>
This commit is contained in:
Michael Walle
2025-08-28 14:40:42 +02:00
committed by Daniel Lezcano
parent 117bdda24d
commit 55173287e7

View File

@@ -20,6 +20,8 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include "thermal_hwmon.h"
#define K3_VTM_DEVINFO_PWR0_OFFSET 0x4
#define K3_VTM_DEVINFO_PWR0_TEMPSENS_CT_MASK 0xf0
#define K3_VTM_TMPSENS0_CTRL_OFFSET 0x300
@@ -513,6 +515,8 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
ret = PTR_ERR(ti_thermal);
goto err_free_ref_table;
}
devm_thermal_add_hwmon_sysfs(bgp->dev, ti_thermal);
}
platform_set_drvdata(pdev, bgp);