From: Philipp Zabel <p.zabel@pengutronix.de>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
rafael@kernel.org
Cc: daniel.lezcano@kernel.org, rui.zhang@intel.com,
lukasz.luba@arm.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, matthias.bgg@gmail.com,
laura.nao@collabora.com, fshao@chromium.org, wenst@chromium.org,
jiapeng.chong@linux.alibaba.com, frank-w@public-files.de,
bchihi@baylibre.com, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH v2 2/2] thermal/drivers/mediatek/lvts_thermal: Make reset optional for MT8196
Date: Wed, 22 Jul 2026 08:47:15 +0200 [thread overview]
Message-ID: <cd13a97b78f3d940d23b52f94b39f99c52212d0a.camel@pengutronix.de> (raw)
In-Reply-To: <20260721105230.101906-3-angelogioacchino.delregno@collabora.com>
On Di, 2026-07-21 at 12:52 +0200, AngeloGioacchino Del Regno wrote:
> Depending on the SoC+Firmware combination, the LVTS hardware may be
> may be actively used by one or even multiple concurrent MCUs!
> In this case, resetting it may produce either a severe slowdown of
> the entire system, or even a thermal protection AP reset, as some
> MCU(s) may be reading a very high or very low temperature while the
> LVTS is being reset.
>
> On those, don't fail if no reset is found as that may be omitted on
> purpose, but still check if there's one, because some board(s) may
> be running on a different bootchain with reduced firmwares or using
> firmwares with reduced functionality.
>
> So, use devm_reset_control_get_optional_exclusive() instead, as the
> LVTS controller always had only one reset and retrieving that by
> index, specifically, always made little sense anyway.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/thermal/mediatek/lvts_thermal.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index 92711896ce24..8b779fc5e970 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
> @@ -1473,7 +1473,20 @@ static int lvts_probe(struct platform_device *pdev)
> if (IS_ERR(lvts_td->base))
> return dev_err_probe(dev, PTR_ERR(lvts_td->base), "Failed to map io resource\n");
>
> - lvts_td->reset = devm_reset_control_get_by_index(dev, 0);
> + /*
> + * Depending on the SoC+Firmware combination, the LVTS hardware may be
> + * may be actively used by one or even multiple concurrent MCUs!
> + * In this case, resetting it may produce either a severe slowdown of
> + * the entire system, or even a thermal protection AP reset, as some
> + * MCU(s) may be reading a very high or very low temperature while the
> + * LVTS is being reset.
> + *
> + * On those, don't fail if no reset is found as that may be omitted on
> + * purpose, but still check if there's one, because some board(s) may
> + * be running on a different bootchain with reduced firmwares or using
> + * firmwares with reduced functionality.
> + */
> + lvts_td->reset = devm_reset_control_get_optional_exclusive(dev, NULL);
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
next prev parent reply other threads:[~2026-07-22 6:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 10:52 [PATCH v2 0/2] lvts_thermal: " AngeloGioacchino Del Regno
2026-07-21 10:52 ` [PATCH v2 1/2] dt-bindings: thermal: mediatek: Make resets " AngeloGioacchino Del Regno
2026-07-22 3:35 ` Chen-Yu Tsai
2026-07-28 9:59 ` Krzysztof Kozlowski
2026-07-21 10:52 ` [PATCH v2 2/2] thermal/drivers/mediatek/lvts_thermal: Make reset " AngeloGioacchino Del Regno
2026-07-22 3:37 ` Chen-Yu Tsai
2026-07-22 6:47 ` Philipp Zabel [this message]
2026-08-07 12:10 ` [PATCH v2 0/2] lvts_thermal: " Daniel Lezcano
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=cd13a97b78f3d940d23b52f94b39f99c52212d0a.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bchihi@baylibre.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frank-w@public-files.de \
--cc=fshao@chromium.org \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=laura.nao@collabora.com \
--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=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=wenst@chromium.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®