[PATCH V6 01/15] ARM: dts: imx6q-dhcom: Add the parallel system bus

Marek Vasut marex at denx.de
Sun Jul 18 09:21:29 PDT 2021


On 7/18/21 5:31 PM, Fabio Estevam wrote:
> Hi Christoph,
> 
> On 14/07/2021 18:06, Christoph Niedermaier wrote:
> 
>> +    /* OE pin of the latch is low active */
>> +    reg_latch_oe_on: regulator-latch-oe-on {
>> +        compatible = "regulator-fixed";
>> +        gpio = <&gpio3 22 0>;
> 
> I understand that the GPIO polarity is ignored, but it would be better to
> just describe the real polarity in the devicetree:
> 
> gpio = <&gpio3 22 GPIO_ACTIVE_LOW>;

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