[PATCH] thermal: tegra-bpmp: add hwmon sysfs support

From: Pufan Jin

Date: Sun Nov 29 2026 - 09:11:40 EST


The tegra-bpmp-thermal driver registers thermal zones using the
devm_thermal_of_zone_register() helper. However, the core of-thermal
framework sets tzp->no_hwmon = true, which prevents the automatic creation
of hwmon sysfs attributes for device tree defined thermal zones.

As a result, standard user-space hardware monitoring tools (such as
lm-sensors) are unable to detect or display the BPMP thermal zones
(e.g., CPU, GPU, AUX, PLL, and AO temperatures on Tegra186 / Jetson TX2).

Add a call to devm_thermal_add_hwmon_sysfs() for each successfully
registered thermal zone device, matching the pattern used by other thermal
sensor drivers (e.g., tegra30-tsensor.c).

Signed-off-by: Pufan Jin <cyan2254650260@xxxxxxxxx>
---
drivers/thermal/tegra/tegra-bpmp-thermal.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/thermal/tegra/tegra-bpmp-thermal.c b/drivers/thermal/tegra/tegra-bpmp-thermal.c
index 5ac1f63e16..c4051329e8 100644
--- a/drivers/thermal/tegra/tegra-bpmp-thermal.c
+++ b/drivers/thermal/tegra/tegra-bpmp-thermal.c
@@ -16,6 +16,8 @@
#include <soc/tegra/bpmp.h>
#include <soc/tegra/bpmp-abi.h>

+#include "../thermal_hwmon.h"
+
struct tegra_bpmp_thermal_zone {
struct tegra_bpmp_thermal *tegra;
struct thermal_zone_device *tzd;
@@ -281,6 +283,7 @@ static int tegra_bpmp_thermal_probe(struct platform_device *pdev)
}

zone->tzd = tzd;
+ devm_thermal_add_hwmon_sysfs(&pdev->dev, tzd);
INIT_WORK(&zone->tz_device_update_work,
tz_device_update_work_fn);

--
2.56.1