diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 950d3d6b2b7ffa697ce6ddc4c1ff7f9441ce2db3..662c6f363ac20bdd369b8448f8291954ad971e73 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -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