From: Pufan Jin <cyan2254650260@gmail.com>
To: Daniel Lezcano <daniel.lezcano@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>
Cc: Lukasz Luba <lukasz.luba@arm.com>,
Mikko Perttunen <mperttunen@nvidia.com>,
Zhang Rui <rui.zhang@intel.com>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: [PATCH] thermal: tegra-bpmp: add hwmon sysfs support
Date: Sun, 29 Nov 2026 22:11:29 +0800 [thread overview]
Message-ID: <20261129141129.365139-1-cyan2254650260@gmail.com> (raw)
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
reply other threads:[~2026-11-29 14:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261129141129.365139-1-cyan2254650260@gmail.com \
--to=cyan2254650260@gmail.com \
--cc=daniel.lezcano@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mperttunen@nvidia.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=thierry.reding@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®