Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Alexandre Mergnat <amergnat@baylibre.com>
Cc: Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
	 Ulf Hansson <ulfh@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	 Daniel Lezcano <daniel.lezcano@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	 Lukasz Luba <lukasz.luba@arm.com>,
	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
Date: Mon, 30 Nov 2026 16:31:42 +0100	[thread overview]
Message-ID: <aw2WURqqpGCJxjuY@monoceros> (raw)
In-Reply-To: <20261130-mtk-mfg-thermal-v1-3-e0617e26f902@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 2673 bytes --]

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.
> 
> The auxiliary device shares the device tree node of the gpufreq device,
> so a thermal zone selects this sensor by referring to that node.
> 
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
> ---
>  drivers/thermal/mediatek/Kconfig         |  9 ++++++
>  drivers/thermal/mediatek/Makefile        |  1 +
>  drivers/thermal/mediatek/gpueb_thermal.c | 52 ++++++++++++++++++++++++++++++++
>  3 files changed, 62 insertions(+)
> 
> 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.
>  
> +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)	+= auxadc_thermal.o
>  obj-$(CONFIG_MTK_LVTS_THERMAL)	+= lvts_thermal.o
> +obj-$(CONFIG_MTK_GPUEB_THERMAL)	+= gpueb_thermal.o
> diff --git a/drivers/thermal/mediatek/gpueb_thermal.c b/drivers/thermal/mediatek/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 <linux/auxiliary_bus.h>
> +#include <linux/err.h>
> +#include <linux/mod_devicetable.h>

<linux/auxiliary_bus.h> already provides auxiliary_device_id with much
less overhead than <linux/mod_devicetable.h>.

So to reduce build time (a tiny bit) and build dependencies and not
fight against my quest to remove <linux/mod_devicetable.h>, please drop
the #include for <linux/mod_devicetable.h>.

Thanks
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2026-11-30 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 14:19 [PATCH 0/3] Add the MT8196 GPU temperature sensor Alexandre Mergnat
2026-11-30 14:19 ` [PATCH 1/3] dt-bindings: power: mt8196-gpufreq: Add #thermal-sensor-cells Alexandre Mergnat
2026-11-30 14:19 ` [PATCH 2/3] pmdomain: mediatek: mfg: Expose GPU temperature Alexandre Mergnat
2026-11-30 14:19 ` [PATCH 3/3] thermal/drivers/mediatek: Add GPUEB thermal driver Alexandre Mergnat
2026-11-30 15:31   ` Uwe Kleine-König [this message]

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=aw2WURqqpGCJxjuY@monoceros \
    --to=u.kleine-koenig@baylibre.com \
    --cc=amergnat@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nicolas.frattaroli@collabora.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=ulfh@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