Re: [PATCH 2/4] thermal/drivers/mediatek: Add support for setting sampling mode per SoC
From: Roman Vivchar
Date: Fri Dec 04 2026 - 06:50:57 EST
On Thursday, December 3rd, 2026 at 2:03 PM, Ben Grisdale via B4 Relay <devnull+bengris32.protonmail.ch@xxxxxxxxxx> wrote:
> From: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
>
> The auxadc thermal controllers on MediaTek SoCs support hardware
> sampling, controlled via the TEMP_MSRCTL0 register.
>
> The sensors on some SoCs may suffer from a certain amount of
> jitter between readings. To mitigate this, especially on mobile
> SoCs, MediaTek usually enables this sampling functionality [1].
>
> Add a new member msr_sample to the compatible data for configuring
> this on a per-SoC basis. No functional change intended for existing
> SoCs as the default remains 0.
>
> Link: https://github.com/helio-x20/linux/blob/helio-x20/drivers/misc/mediatek/thermal/mt6797/src/mtk_tc.c#L898 [1]
> Signed-off-by: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
> ---
This makes thermal reporting more stable on the mt6797.
Tested-by: Roman Vivchar <rva333@xxxxxxxxxxxxxx> # Xiaomi Redmi Note 4 (MTK)