From: Fabio Estevam <festevam@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Leonard Crestez <leonard.crestez@nxp.com>,
John Stultz <john.stultz@linaro.org>,
Mark Brown <broonie@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Fugang Duan <fugang.duan@nxp.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Yongcai Huang <anson.huang@nxp.com>,
Tony Lindgren <tony@atomide.com>,
Mike Rapoport <rppt@linux.vnet.ibm.com>,
jmkrzyszt@gmail.com
Subject: Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only
Date: Mon, 1 Oct 2018 17:37:02 -0300 [thread overview]
Message-ID: <CAOMZO5BhjDk4u4Y4H7swKK0faWaZWL7sFHZC7=G8Em0-jusUHA@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdbcBrjKar4CDg+yEVuCNE3RiGD61UkPasZ35SSmSNsUBA@mail.gmail.com>
Hi Linus,
On Mon, Oct 1, 2018 at 5:17 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> > reg_enet_3v3: regulator-enet-3v3 {
> > compatible = "regulator-fixed";
> > pinctrl-names = "default";
> > pinctrl-0 = <&pinctrl_enet_3v3>;
> > regulator-name = "enet_3v3";
> > regulator-min-microvolt = <3300000>;
> > regulator-max-microvolt = <3300000>;
> > gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
> > };
>
> This is a bit odd actually, the GPIO_ACTIVE_LOW flag will
> be ignored as you see:
Yes, the flag will be ignored by the regulator driver, but the dts
description is correct: it is an active low GPIO that turns on the
reg_enet_3v3 regulator.
The 'enable-active-high' flag needs to be passed to indicate an active
high polarity.
> > [ 0.153171] reg_fixed_voltage_probe(179): regulator-enet-3v3 call gpiod_get_optional gflags=0x7 ena_gpio_invert
> > [ 0.153218] regulator-enet-3v3 GPIO handle specifies active low - ignored
> > [ 0.153233] of_gpio_flags_quirks(83): regulator-enet-3v3 set active low because !enable-active-high
>
> Because regulators don't specify active high/low in the second
> cell because of legacy bindings.
>
> So this should not be in the device tree anyway, it should be
> GPIO_ACTIVE_HIGH or just 0.
Then it would provide a wrong description that does not describe the reality.
next prev parent reply other threads:[~2018-10-01 20:36 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 12:24 [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only Linus Walleij
2018-09-10 17:01 ` Janusz Krzysztofik
2018-09-11 16:06 ` Mike Rapoport
2018-09-28 23:32 ` John Stultz
2018-09-29 17:38 ` Linus Walleij
2018-10-01 18:53 ` Leonard Crestez
2018-10-01 20:16 ` Linus Walleij
2018-10-01 20:37 ` Fabio Estevam [this message]
2018-10-01 20:48 ` Linus Walleij
[not found] ` <CGME20181011090112eucas1p286d8c1edfc1a2a207d8a11c5ad7eb20e@eucas1p2.samsung.com>
2018-10-11 9:01 ` Marek Szyprowski
2018-10-11 9:29 ` Linus Walleij
2018-10-11 9:46 ` Marek Szyprowski
2018-10-11 13:15 ` Mark Brown
2018-10-11 15:00 ` Jon Hunter
2018-10-11 15:34 ` Marcel Ziswiler
2018-10-11 17:47 ` Linus Walleij
2018-10-12 9:43 ` Marcel Ziswiler
2018-10-12 10:39 ` Jon Hunter
2018-10-12 10:43 ` Russell King - ARM Linux
2018-10-12 11:03 ` Linus Walleij
2018-10-12 11:43 ` Marcel Ziswiler
2018-10-12 12:59 ` Russell King - ARM Linux
2018-10-12 13:13 ` Marcel Ziswiler
2018-10-12 16:57 ` Mark Brown
2018-10-12 13:58 ` Andy Shevchenko
2018-10-12 16:17 ` Mark Brown
2018-10-11 17:45 ` Linus Walleij
2018-10-12 10:25 ` Jon Hunter
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='CAOMZO5BhjDk4u4Y4H7swKK0faWaZWL7sFHZC7=G8Em0-jusUHA@mail.gmail.com' \
--to=festevam@gmail.com \
--cc=anson.huang@nxp.com \
--cc=broonie@kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=fugang.duan@nxp.com \
--cc=jmkrzyszt@gmail.com \
--cc=john.stultz@linaro.org \
--cc=leonard.crestez@nxp.com \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rppt@linux.vnet.ibm.com \
--cc=shawnguo@kernel.org \
--cc=tony@atomide.com \
/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;
as well as URLs for NNTP newsgroup(s).