Skip to contentSkip to conversation

gpio: of: Handle both enable-gpio{,s}

PATCH In review [email protected] 2 participants 3 messages Feb 20, 2019 – Feb 21, 2019 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: of: Handle both enable-gpio{,s}

From: Marek Vasut <[email protected]>

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.

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]>

To: [email protected]

---
 drivers/gpio/gpiolib-of.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/gpiolib-of.c +2 -1
index bddfc6102a50..8b9c3ab70f6e 100644
@@ -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
Signature · 1 line
2.19.2
#1 lore raw
Quoted 14 lines · On Wed, Feb 20, 2019 at 12:24 PM <[email protected]> wrote:

From: Marek Vasut <[email protected]>

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.

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]>
Quoted 1 line

To: [email protected]

This patch applied on top of Thierry's patch (which worked fine so I guess this order was implied).

Yours,
Linus Walleij

#2 lore raw
Quoted 18 lines · Linus Walleij
Quoted 14 lines · On Wed, Feb 20, 2019 at 12:24 PM <[email protected]> wrote:

From: Marek Vasut <[email protected]>

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.

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]>
Quoted 1 line

To: [email protected]

Quoted 2 lines

This patch applied on top of Thierry's patch (which worked fine so I guess this order was implied).

Jupp, thanks!

Signature · 2 lines
Best regards,
Marek Vasut