From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E308D606A329 for ; Mon, 30 Nov 2026 16:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ZmXn9GSG; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.a=rsa-sha256 header.s=google header.b=WsY1nAsi DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=xj0AHsLrmQ202hEBId+65kYQ6O04XMnSAjjhd5Zm4RI=; b=ZmXn9GSG4iF8KwqUr3SHlo/10P 6Pym7ZS510XAglp3MB1UUchW5ytrGSs/KxBb5r2qiCK4TRgNvGJnigiWCZM8J2pmKz3efgGGjK6/2 EDWv2DHsii+79z2prKAvxk8JZ3qyBauFiZAOUAhTig6Zl0EzdQjuc/YRW8b93AkMtqkDGyOI4O7aK v3cVod2mVOq4K/0W2Yw/0ysBBiPHNpsRdGOYIOPtDy+SjJvNrGXd4+llBiAta7fld6ms/R/nO+KUf 6G3JsZYKAmNcj452aothVHWGHOXCuGjGDUe+rhIhE8A9tGNTsISrZLumYODuBsL9Q+wIYrLXL0UBD vQw+kXYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY3M8-000000052g3-39tP; Mon, 30 Nov 2026 15:31:52 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY3M2-000000052eY-2TDf for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2026 15:31:51 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-4a357b1c649so6091746f8f.3 for ; Mon, 30 Nov 2026 07:31:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1796052705; x=1796657505; darn=lists.infradead.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=xj0AHsLrmQ202hEBId+65kYQ6O04XMnSAjjhd5Zm4RI=; b=WsY1nAsiC8p34lta3MCar1Mgqs5/6axm8IndnyD/TTUa28K47TGxbYXYtEuaUXnpZa 72E1Ks3pnmL8K2L94TpqgAsFiQZWRuYcupECITXak+L0AzpPDMyfwFCJZEL0QKRbBbo1 uTVATYQIdEMNypxELawIPiX8TjR7rx2xpCeGymABZFOs17PoN3XuHm+QK39RRM3rFTiV luU8rYRr5zaYeH/yLoQfxG77WvYG5mSwQtN1q/yafKtcHuZz37HfO1SOKlrSls9w/QPt q4FwP9aQyxNUZS0L0uuUFh8voyYjmMavku1DfITXha+DzwiTeGXFidDa9oEHhSi86ird ZdYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796052705; x=1796657505; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=xj0AHsLrmQ202hEBId+65kYQ6O04XMnSAjjhd5Zm4RI=; b=OzgbghFKQ/AP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S04DM/ypW2HYR2xRoAlfDjnfXeom44ApR1nIatwZ1NVpR rjV+KGgwfuIwZFefjkovkJxqYIA1uR1kTh6p23gwUGW96nMhTYZxHCBZOpGUZnMOEO6YweMd5AQ Zvdm6+sQfmOZ22CFrBIkW+wcEW/jgjteDU6j/MxBDKOgJBVXo9jpvQ9jgQqydP27mu1ILm7hYko nqKxzkdguPMNEnk3L X-Received: by 2002:a05:6000:2883:b0:4a4:39bb:970d with SMTP id ffacd0b85a97d-4abab02c469mr64303526f8f.2.1796052704566; Mon, 30 Nov 2026 07:31:44 -0800 (PST) Received: from localhost (p200300f65f125a08442a8896ffafbf0f.dip0.t-ipconnect.de. [2003:f6:5f12:5a08:442a:8896:ffaf:bf0f]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-4b70c05b9desm40857341f8f.54.2026.11.30.07.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 07:31:43 -0800 (PST) Date: Mon, 30 Nov 2026 16:31:42 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Alexandre Mergnat Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Nicolas Frattaroli , Ulf Hansson , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 3/3] thermal/drivers/mediatek: Add GPUEB thermal driver Message-ID: References: <20261130-mtk-mfg-thermal-v1-0-e0617e26f902@baylibre.com> <20261130-mtk-mfg-thermal-v1-3-e0617e26f902@baylibre.com> X-Archived-By: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sgkx5usyeo3f4s6v" Content-Disposition: inline In-Reply-To: <20261130-mtk-mfg-thermal-v1-3-e0617e26f902@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_073146_654580_068EB4FA X-CRM114-Status: GOOD ( 26.94 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 --sgkx5usyeo3f4s6v Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 3/3] thermal/drivers/mediatek: Add GPUEB thermal driver MIME-Version: 1.0 On Mon, Nov 30, 2026 at 02:19:33PM +0000, Alexandre Mergnat wrote: > Add a driver for the auxiliary device that the mtk-mfg power domain > driver creates on MT8196. It registers the GPU temperature that the > GPUEB reports as a thermal sensor, so that a thermal zone can monitor > the GPU. >=20 > The auxiliary device shares the device tree node of the gpufreq device, > so a thermal zone selects this sensor by referring to that node. >=20 > Signed-off-by: Alexandre Mergnat > --- > drivers/thermal/mediatek/Kconfig | 9 ++++++ > drivers/thermal/mediatek/Makefile | 1 + > drivers/thermal/mediatek/gpueb_thermal.c | 52 ++++++++++++++++++++++++++= ++++++ > 3 files changed, 62 insertions(+) >=20 > diff --git a/drivers/thermal/mediatek/Kconfig b/drivers/thermal/mediatek/= Kconfig > index d82c86d9be56..a721b75d0790 100644 > --- a/drivers/thermal/mediatek/Kconfig > +++ b/drivers/thermal/mediatek/Kconfig > @@ -34,4 +34,13 @@ config MTK_LVTS_THERMAL_DEBUGFS > help > Enable this option to debug the internals of the device driver. > =20 > +config MTK_GPUEB_THERMAL > + tristate "GPUEB GPU temperature driver for MediaTek SoCs" > + depends on MTK_MFG_PM_DOMAIN > + help > + Enable this option if you want to get GPU temperature > + information for MediaTek SoCs such as the MT8196. > + The temperature is reported by the GPUEB, the microcontroller > + that manages the GPU power and frequency. > + > endif > diff --git a/drivers/thermal/mediatek/Makefile b/drivers/thermal/mediatek= /Makefile > index 1c6daa1e644b..3ec5295e8514 100644 > --- a/drivers/thermal/mediatek/Makefile > +++ b/drivers/thermal/mediatek/Makefile > @@ -1,2 +1,3 @@ > obj-$(CONFIG_MTK_SOC_THERMAL) +=3D auxadc_thermal.o > obj-$(CONFIG_MTK_LVTS_THERMAL) +=3D lvts_thermal.o > +obj-$(CONFIG_MTK_GPUEB_THERMAL) +=3D gpueb_thermal.o > diff --git a/drivers/thermal/mediatek/gpueb_thermal.c b/drivers/thermal/m= ediatek/gpueb_thermal.c > new file mode 100644 > index 000000000000..f63b5751a0c0 > --- /dev/null > +++ b/drivers/thermal/mediatek/gpueb_thermal.c > @@ -0,0 +1,52 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2026 BayLibre, SAS > + */ > + > +#include > +#include > +#include already provides auxiliary_device_id with much less overhead than . So to reduce build time (a tiny bit) and build dependencies and not fight against my quest to remove , please drop the #include for . Thanks Uwe --sgkx5usyeo3f4s6v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmsNltsACgkQj4D7WH0S /k4/swgAmD03JtFswv3Kzu/UVE/udTb+JvqDEd82UXAv2fTy+mS0Oxlif+ssSqUC XnT7yjPW4HbEHEJCjyECb9202EH547uNeXtq9SClZ2JaKDuNsRvIFFTbp8v2PdRr Q5uzC43bjNej30OyUMLvw+QSd4Sc9jMHFskm1t7LKu0ABaymZRYjZgjV7fCI8gFk fo+im3ggaQlPVYFe/QQJMscayktfDgPg/EqrLsGI49RIiXuqMDf6ycmFL5Til2zw ffyOW8Rwj50mKXXBlw492QvY9zkMVRdVRUlbDLfAkaXSaUiX2zH75ye26p/J2cW4 l+j4/uogXN3FPluod96DH9uXXYHN6g== =u2qw -----END PGP SIGNATURE----- --sgkx5usyeo3f4s6v--