From: "Ondřej Jirman" <megous@megous.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Mark Rutland <mark.rutland@arm.com>,
Jose Abreu <joabreu@synopsys.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
devicetree@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Maxime Ripard <mripard@kernel.org>,
linux-stm32@st-md-mailman.stormreply.com,
Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
"David S. Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/6] net: stmmac: sun8i: Use devm_regulator_get for PHY regulator
Date: Tue, 20 Aug 2019 18:20:27 +0200 [thread overview]
Message-ID: <20190820162027.7erc2rlvoqasfjk7@core.my.home> (raw)
In-Reply-To: <20190820155744.GN29991@lunn.ch>
Hi,
On Tue, Aug 20, 2019 at 05:57:44PM +0200, Andrew Lunn wrote:
> On Tue, Aug 20, 2019 at 05:47:14PM +0200, Ondřej Jirman wrote:
> > Hi Andrew,
> >
> > On Tue, Aug 20, 2019 at 05:39:39PM +0200, Andrew Lunn wrote:
> > > On Tue, Aug 20, 2019 at 04:53:40PM +0200, megous@megous.com wrote:
> > > > From: Ondrej Jirman <megous@megous.com>
> > > >
> > > > Use devm_regulator_get instead of devm_regulator_get_optional and rely
> > > > on dummy supply. This avoids NULL checks before regulator_enable/disable
> > > > calls.
> > >
> > > Hi Ondrej
> > >
> > > What do you mean by a dummy supply? I'm just trying to make sure you
> > > are not breaking backwards compatibility.
> >
> > Sorry, I mean dummy regulator. See:
> >
> > https://elixir.bootlin.com/linux/latest/source/drivers/regulator/core.c#L1874
> >
> > On systems that use DT (i.e. have_full_constraints() == true), when the
> > regulator is not found (ENODEV, not specified in DT), regulator_get will return
> > a fake dummy regulator that can be enabled/disabled, but doesn't do anything
> > real.
>
> Hi Ondrej
>
> But we also gain a new warning:
>
> dev_warn(dev,
> "%s supply %s not found, using dummy regulator\n",
> devname, id);
>
> This regulator is clearly optional, so there should not be a warning.
>
> Maybe you can add a new get_type, OPTIONAL_GET, which does not issue
> the warning, but does give back a dummy regulator.
We already had a info message. See my other e-mail with the dmesg output.
IMO, that warning is useful during development, and more informative than the
previous one.
regards,
o.
> Thanks
> Andrew
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-20 16:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 14:53 [PATCH 0/6] Add ethernet support for Orange Pi 3 megous
2019-08-20 14:53 ` [PATCH 1/6] dt-bindings: net: sun8i-a83t-emac: Add phy-supply property megous
2019-08-20 16:18 ` Rob Herring
2019-08-20 14:53 ` [PATCH 2/6] dt-bindings: net: sun8i-a83t-emac: Add phy-io-supply property megous
2019-08-20 16:20 ` Rob Herring
2019-08-20 16:34 ` Ondřej Jirman
2019-08-20 16:57 ` Rob Herring
2019-08-20 22:36 ` Ondřej Jirman
2019-08-20 14:53 ` [PATCH 3/6] net: stmmac: sun8i: Use devm_regulator_get for PHY regulator megous
2019-08-20 15:39 ` Andrew Lunn
2019-08-20 15:47 ` Ondřej Jirman
2019-08-20 15:57 ` Andrew Lunn
2019-08-20 16:20 ` Ondřej Jirman [this message]
2019-08-20 15:56 ` Ondřej Jirman
2019-08-20 14:53 ` [PATCH 4/6] net: stmmac: sun8i: Rename PHY regulator variable to regulator_phy megous
2019-08-20 14:53 ` [PATCH 5/6] net: stmmac: sun8i: Add support for enabling a regulator for PHY I/O pins megous
2019-08-20 14:53 ` [PATCH 6/6] arm64: dts: allwinner: orange-pi-3: Enable ethernet megous
2019-08-20 20:56 ` [PATCH 0/6] Add ethernet support for Orange Pi 3 David Miller
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=20190820162027.7erc2rlvoqasfjk7@core.my.home \
--to=megous@megous.com \
--cc=alexandre.torgue@st.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=joabreu@synopsys.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mripard@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=robh+dt@kernel.org \
--cc=wens@csie.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