From: Philipp Zabel <p.zabel@pengutronix.de>
To: Chukun Pan <amadeus@jmu.edu.cn>
Cc: heiko@sntech.de, kishon@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
linux-rockchip@lists.infradead.org, liujianfeng1994@gmail.com,
vkoul@kernel.org
Subject: Re: [PATCH 1/2] Re: [PATCH 1/1] phy: rockchip: naneng-combphy: compatible with old DT for RK3568
Date: Mon, 06 Jan 2025 10:19:36 +0100 [thread overview]
Message-ID: <0b5eaa41745209a5a5368516d8433bb3319ca9b5.camel@pengutronix.de> (raw)
In-Reply-To: <20250106075015.1061630-1-amadeus@jmu.edu.cn>
On Mo, 2025-01-06 at 15:50 +0800, Chukun Pan wrote:
> Hi,
> > > 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().
>
> I will change this.
>
> > > + /* fallback to old behaviour */
> > > + if (IS_ERR(ERR_PTR(priv->phy_rst)))
> >
> > Drop superfluous ERR_PTR().
>
> I think it would be better if I changed it to this?
>
> if (PTR_ERR(priv->phy_rst) == -ENOENT)
> priv->phy_rst = devm_reset_control_array_get_exclusive(dev);
I agree, otherwise this would ignore a broken reset-names property in
the device tree. When the resets property is broken, the fallback would
fail anyway.
regards
Philipp
next prev parent reply other threads:[~2025-01-06 9:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 7:00 Chukun Pan
2025-01-06 7:33 ` Philipp Zabel
2025-01-06 7:50 ` [PATCH 1/2] " Chukun Pan
2025-01-06 9:19 ` Philipp Zabel [this message]
2025-01-06 12:03 ` kernel test robot
2025-01-06 21:37 ` kernel test robot
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=0b5eaa41745209a5a5368516d8433bb3319ca9b5.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=amadeus@jmu.edu.cn \
--cc=heiko@sntech.de \
--cc=kishon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=liujianfeng1994@gmail.com \
--cc=vkoul@kernel.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®