* [PATCH] thermal: tegra-bpmp: add hwmon sysfs support
@ 2026-11-29 14:11 Pufan Jin
0 siblings, 0 replies; only message in thread
From: Pufan Jin @ 2026-11-29 14:11 UTC (permalink / raw)
To: Daniel Lezcano, Jonathan Hunter, Rafael J . Wysocki, Thierry Reding
Cc: Lukasz Luba, Mikko Perttunen, Zhang Rui, linux-kernel, linux-pm,
linux-tegra
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@gmail.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-29 14:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29 14:11 [PATCH] thermal: tegra-bpmp: add hwmon sysfs support Pufan Jin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®