All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	Shawn Guo <shawnguo@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo
Date: Sun, 5 Sep 2021 16:35:59 +0200	[thread overview]
Message-ID: <c78f5459-fd5f-6d04-e832-2439e8ac3c31@denx.de> (raw)
In-Reply-To: <CAOMZO5DEqLLt29UOsB1TH6N15ufH4+qb7WuJJaW6HED61Q4Nzw@mail.gmail.com>

On 9/5/21 2:00 PM, Fabio Estevam wrote:
> Hi Marek,

Hi,

> On Sat, Sep 4, 2021 at 11:57 PM Marek Vasut <marex@denx.de> wrote:
> 
>> No, the GPIO flags are ignored by gpiolib-of and the signal is active
>> low. That's why there is that zero, no flags, and no enable-active-high
>> property.
> 
> Yes, correct. The GPIO flag is ignored by "regulator-fixed".
> 
> As you removed the 'enable-active-high' property, you turned the
> regulator to active low as needed.
> 
> This is correct.
> 
> gpio = <&gpio1 2 0> is the same as gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>
> 
> I just suggested gpio = <&gpio1 2 GPIO_ACTIVE_LOW> to make it clearer
> what is the real polarity.
> 
> The GPIO flag is ignored, I know. No issues if you want to keep it as
> gpio = <&gpio1 2 0>.

We had the same discussion before around this patch :)
[PATCH V6 01/15] ARM: dts: imx6q-dhcom: Add the parallel system bus
Message-ID: <f33eaeef754377f35b1bfa4fe62def97@denx.de>

The 0 is correct as the field is ignored, please keep it.

Any other variants (like GPIO_ACTIVE_LOW = 1) interact badly with
drivers/gpio/gpiolib-of.c of_gpio_flags_quirks()
which is already a total compatibility attempt mess and lead to odd 
misbehavior of the regulator where the polarity of the GPIO is randomly 
interpreted as low or high dependent on the kernel version.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-09-05 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-05  0:01 [PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo Marek Vasut
2021-09-05  0:49 ` Fabio Estevam
2021-09-05  2:57   ` Marek Vasut
2021-09-05 12:00     ` Fabio Estevam
2021-09-05 14:35       ` Marek Vasut [this message]
2021-09-05 13:03 ` Fabio Estevam
2021-09-22  8:14 ` Shawn Guo

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=c78f5459-fd5f-6d04-e832-2439e8ac3c31@denx.de \
    --to=marex@denx.de \
    --cc=festevam@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=shawnguo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.