[PATCH 2/2] thermal/drivers/mediatek/lvts_thermal: Add MT8189 support

Philipp Zabel p.zabel at pengutronix.de
Mon Nov 10 01:53:50 PST 2025


On Mo, 2025-11-10 at 17:40 +0800, Hanchien Lin wrote:
> Add support for the MediaTek MT8189 SoC to the LVTS thermal driver.
> 
> Signed-off-by: Hanchien Lin <hanchien.lin at mediatek.com>
> ---
>  drivers/thermal/mediatek/lvts_thermal.c | 155 ++++++++++++++++++++++--
>  1 file changed, 144 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index ab55b20cda47..8c15fdaac48c 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
[...]
> @@ -1334,9 +1359,15 @@ 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);
> -	if (IS_ERR(lvts_td->reset))
> -		return dev_err_probe(dev, PTR_ERR(lvts_td->reset), "Failed to get reset control\n");
> +	if (!lvts_data->reset_no_need) {
> +		lvts_td->reset = devm_reset_control_get_by_index(dev, 0);

This should be devm_reset_control_get_exclusive(dev, NULL) instead of
devm_reset_control_get_by_index(dev, 0).

No need to use by_index for a single reset control.

regards
Philipp



More information about the Linux-mediatek mailing list