gpio: of: Handle both enable-gpio{,s}
authorMarek Vasut <[email protected]>
Wed, 20 Feb 2019 11:24:30 +0000 (12:24 +0100)
committerLinus Walleij <[email protected]>
Thu, 21 Feb 2019 12:12:04 +0000 (13:12 +0100)
Handle both enable-gpio and enable-gpios properties of the GPIO
regulator in the quirk. The later is the preferred modern name
of the property.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Jan Kotas <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Wolfram Sang <[email protected]>
Cc: [email protected]
To: [email protected]
Signed-off-by: Linus Walleij <[email protected]>
drivers/gpio/gpiolib-of.c

index 950d3d6b2b7ffa697ce6ddc4c1ff7f9441ce2db3..662c6f363ac20bdd369b8448f8291954ad971e73 100644 (file)
@@ -87,7 +87,8 @@ static void of_gpio_flags_quirks(struct device_node *np,
            (of_device_is_compatible(np, "regulator-fixed") ||
             of_device_is_compatible(np, "reg-fixed-voltage") ||
             (of_device_is_compatible(np, "regulator-gpio") &&
-             strcmp(propname, "enable-gpio") == 0))) {
+             !(strcmp(propname, "enable-gpio") &&
+               strcmp(propname, "enable-gpios"))))) {
                /*
                 * The regulator GPIO handles are specified such that the
                 * presence or absence of "enable-active-high" solely controls