[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b04ca7fa5135c1194c39a9fbf2d6ab5630d6ef3.camel@pengutronix.de>
Date: Mon, 06 Jan 2025 08:33:36 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Chukun Pan <amadeus@....edu.cn>, Vinod Koul <vkoul@...nel.org>
Cc: Heiko Stuebner <heiko@...ech.de>, Kishon Vijay Abraham I
<kishon@...nel.org>, Jianfeng Liu <liujianfeng1994@...il.com>,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
linux-phy@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] phy: rockchip: naneng-combphy: compatible with old
DT for RK3568
On Mo, 2025-01-06 at 15:00 +0800, Chukun Pan wrote:
> The device tree of RK3568 did not specify reset-names before.
> So add fallback to old behaviour to be compatible with old DT.
>
> Fixes: fbcbffbac994 ("phy: rockchip: naneng-combphy: fix phy reset")
> Cc: Jianfeng Liu <liujianfeng1994@...il.com>
> Signed-off-by: Chukun Pan <amadeus@....edu.cn>
> ---
> drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> index a1532ef8bbe9..372f5c07b5bd 100644
> --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> @@ -325,6 +325,10 @@ static int rockchip_combphy_parse_dt(struct device *dev, struct rockchip_combphy
> priv->ext_refclk = device_property_present(dev, "rockchip,ext-refclk");
>
> priv->phy_rst = devm_reset_control_get(dev, "phy");
This should be devm_reset_control_get_exclusive().
> + /* fallback to old behaviour */
> + if (IS_ERR(ERR_PTR(priv->phy_rst)))
Drop superfluous ERR_PTR().
> + priv->phy_rst = devm_reset_control_array_get_exclusive(dev);
> +
I'd drop the empty line, keep error handling close.
> if (IS_ERR(priv->phy_rst))
> return dev_err_probe(dev, PTR_ERR(priv->phy_rst), "failed to get phy reset\n");
>
regards
Philipp
Powered by blists - more mailing lists