[PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

Marek Vasut marex at denx.de
Sun Sep 5 07:35:59 PDT 2021


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 at 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 at 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.



More information about the linux-arm-kernel mailing list