From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.227.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795961498; b=jDMXBZRAT9MjswNxErbCTdpjgcIphJbbAY+xPSxW4zpP3GrwUFVZnK/go7tnS5J1d5+M Y4JfwfBk1KiJmlN+ZJdgKjZatAt6vLtNxffd+53ym+agzqP07kJNbrNBFhv4GTqegwYYL CPd1RlP+H+BvSZcMMh6r1FxERoNNkkqOGi6ocNS4EgwHIxEN0P1yi8y+TfUtfLi0gf0IT dppT/sBo9gchPU6ho7cLORxGIa9JI6AgI1M6CJUNRXJhQhvGLoBKuzSR2o5eTP5G5YVvc nJ0HAeNEcX6dujiItG3M+WNBDag0lVUeES7UoonzcOGT5/HEpqonqBuhj5l5kshafVQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795961498; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=hMQK6hDekOT4eZDPnbMXmd4oC5YLxMnx0UzZ3ZONtCs=; b=vJNldvCcQeGJo71+3dbKVfEGXBCbi5Gj5bAceZvkluGBL06m/5WqRWIhUf0C2PjYY9V7 mNS8ETqVHcSoNtlV02B3OVoa6Vjmu0Xdu2SxykQSiiHGFp0YZJe9oj5C23SlkHvn0fUS/ KXIjUi1PDFgxwebXIiWpERIbZAwYcWj7qS6FQ8HJEqteAtAeZhSQ3CMkmnEl5I/om/8Ap ud5R5i1yCy8+YFxSxJg8z7qm99V1jPCYqVPap/jM7JfSzN9omaGxrwhYikLwh19U0ZL/R O/mCGtHMb1DL7Y4Upw8mG0ZJ0c5NAY2/4iqDBPLPvA/dw6qAWVoSjys+iGBdxDY8ueQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=vQdkhgZO; arc=none smtp.remote-ip=74.125.227.131 Received: from mail-pj2-f3.google.com (mail-pj2-f3.google.com [74.125.227.131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B714606A323 for ; Sun, 29 Nov 2026 14:11:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5B714606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=vQdkhgZO Received: by mail-pj2-f3.google.com with SMTP id 98e67ed59e1d1-3b509dc9d79so606028a91.1 for ; Sun, 29 Nov 2026 06:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795961496; x=1796566296; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=hMQK6hDekOT4eZDPnbMXmd4oC5YLxMnx0UzZ3ZONtCs=; b=vQdkhgZOGd5PhefeblvTE3V6ZgAdJKft1HV8gvvCLwl0YvCsgtj+x0wv+lvT+pu3E+ 4RtfgMZ0SDbjZaCE3CKSX4DVZ/gUzRsg2mEmTgopEtsoNrC5uGWkDpb+O0BcqZVTnLFf Q09pS7a6wkCTqbQ8o8ZnQ9EpyJBL4jbab5VU+P2V2vgtlS8unku7NG1HA0EMxIevEbnN A+uzLu1Ne1cGajl7jUIE9mS0znMrLYntjiI3mP2yshX/7du2t/619rANI3im7TrESICO vycBHkp92f6iulXAYMjZh1WqWADsOT850WMCCqTY1eSVa/J+oXzfKzjzqMi2nw2oGMm9 oU3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795961496; x=1796566296; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=hMQK6hDekOT4eZDPnbMXmd4oC5YLxMnx0UzZ3ZONtCs=; b=X+57Svbtxy7GH2lXM0h5b0rUpl068+R9vT8n5Dd9TIkNN1rSmkWPIACy69n3qhgxcp eNEp+1ucyEeGq2JmyVWUBsB3zm3EYgddRPKOu9ySmvU/rHHOb9ZnE3CNtUlT2aSwwb8p gs8wQTVkK1/EyRbFdKPRODIqFSEcQPRUCtkf2OiZ3Yccuo5VBdwn4RLvbw7RBIfxHWVc /rI8TYtXs+AYRhAaVeX0Y9jozMNSb6Obteyp1O/lSPhF+HPoZqd2/As5mC21N+prLx6+ CIl6wKJNV6R/kxniRlPI5Pypu04VhdzZ9qUazuJWx/nzynHxJN0qJKinK1xoZ1mr1C4v Ot8Q== X-Forwarded-Encrypted: i=1; AL+hErHgpF1x4+vEb3X8dMt0A05eYgagtRJPEngwdhER+XZxao69S11ruupwcTZZfxyMYFT0LSEeXCpnM+g9Pjk=@vger.kernel.org X-Gm-Message-State: APuU4Z8X1Gwl/hcVoYBAC10qqLGhsdCMCyGz+VkVM7Q4R67SsYgmhWXY pwfFfvqm9sNtNTxiXn4PXyICAuUTboQGjKEIvcQ+g4VHmTdQ+i3XcGuD X-Gm-Gg: AZFdTZeden+HKy44nLtMlnSxPoNcD3wlbnHsLoXILV6+oF0Q0hgo+8oMak9dLf8Hjyo 9nfl+FnsK9vKlMkHLagt5s3Jlai6MbtxjzcUO8ACapM6NFkoXiLV3Bm+A7u4CYESF8oFJ8lBAn1 ECAHRJ32ByAqmSkvhBap+rRcNhIvu/FXKPTlcY87d3fEfBRri9iTBQ2Id2sg+MxfMuM1iYmRigu EQuWNgh7rYQ2Nx947r63FSkZaGzbrTEvpEZIn29rPHwfK8Cytiwd8P7BO++CgACGq9v54Q8iLQD TmoYK6dMFRDJ3zoReL9K0jUtMtVWrJh9ebZYzp4cN44xtch+NuALWYFnJ/QoTmpw+3nGa4SUONF aJf2IPuu4ufioQtEx/niDbLhA70BxcSIKkNhfCy2gfsY77IDUXFwSzVE4qIGNVnl+vXRkLtMPAG Og7XspHh1xZxRKj3z0tiiKq9ML63cmv11v7f/LXjcIn5ORD/KIYyP1f0S3dbZzNwmeGsiIaHOXf uLLunwC3PDy7qJ5kraEcvLF0/b4lCZWo7rg9MdMdglLXh0wbWEdP+HpjfACa7kFnYfq/HktPnhx U1boVVM5J5umOpGx6cW5LoJmre5D X-Received: by 2002:a17:90b:4d11:b0:3b4:d00b:d0b3 with SMTP id 98e67ed59e1d1-3b4d00bd2cemr20308476a91.51.1795961496535; Sun, 29 Nov 2026 06:11:36 -0800 (PST) Received: from AERO17 ([64.118.149.232]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b405d135e9sm50536755a91.4.2026.11.29.06.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 06:11:35 -0800 (PST) From: Pufan Jin To: Daniel Lezcano , Jonathan Hunter , "Rafael J . Wysocki" , Thierry Reding Cc: Lukasz Luba , Mikko Perttunen , Zhang Rui , 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 Message-ID: <20261129141129.365139-1-cyan2254650260@gmail.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 #include +#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