[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGb2v670s_r4NG8hWHQ_exc6TM5JnvAEYw-vp5ndMn39X-B4Yw@mail.gmail.com>
Date: Mon, 30 Jun 2025 12:53:51 +0800
From: Chen-Yu Tsai <wens@...e.org>
To: iuncuim <iuncuim@...il.com>
Cc: Vasily Khoruzhick <anarsoul@...il.com>, Yangtao Li <tiny.windzz@...il.com>,
Jernej Skrabec <jernej.skrabec@...il.com>, Samuel Holland <samuel@...lland.org>,
Andre Przywara <andre.przywara@....com>, "Rafael J . Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-sunxi@...ts.linux.dev, linux-kernel@...r.kernel.org,
Piotr Oniszczuk <piotr.oniszczuk@...il.com>
Subject: Re: [PATCH 2/6] thermal/drivers/sun8i: replace devm_reset_control_get
to shared
On Fri, Apr 11, 2025 at 8:39 AM iuncuim <iuncuim@...il.com> wrote:
>
> From: Mikhail Kalashnikov <iuncuim@...il.com>
>
> The A523 processor has two temperature controllers, but they share a common
> reset line. We need to use devm_reset_control_get_shared() instead of
> devm_reset_control_get()
>
> Signed-off-by: Mikhail Kalashnikov <iuncuim@...il.com>
> ---
> drivers/thermal/sun8i_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
> index 1f3908a60..dc4055c9c 100644
> --- a/drivers/thermal/sun8i_thermal.c
> +++ b/drivers/thermal/sun8i_thermal.c
> @@ -391,7 +391,7 @@ static int sun8i_ths_resource_init(struct ths_device *tmdev)
> return PTR_ERR(tmdev->regmap);
>
> if (tmdev->chip->has_bus_clk_reset) {
> - tmdev->reset = devm_reset_control_get(dev, NULL);
> + tmdev->reset = devm_reset_control_get_shared(dev, NULL);
You could just use devm_reset_control_get_shared_deasserted() and then
drop the reset_control_deassert() and devm_add_action_or_reset() stuff below
this hunk. This simplifies the driver a bit.
> if (IS_ERR(tmdev->reset))
> return PTR_ERR(tmdev->reset);
>
> --
> 2.49.0
>
Powered by blists - more mailing lists