gpio: of: Handle fixed regulator flags properly

Message ID
State Accepted
Commit 906402a44b5d090e9c330c562b8aa65c80790ccc
Headers show
  • gpio: of: Handle fixed regulator flags properly
Related show

Commit Message

Linus Walleij June 12, 2018, 7:36 a.m.
This fixes up the handling of fixed regulator polarity
inversion flags: while I remembered to fix it for the
undocumented "reg-fixed-voltage" I forgot about the
official "regulator-fixed" binding, there are two ways
to do a fixed regulator.

The error was noticed and fixed.

Fixes: a603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags")
Cc: Mark Brown <>
Cc: Thierry Reding <>
Reported-by: Thierry Reding <>
Signed-off-by: Linus Walleij <>

 drivers/gpio/gpiolib-of.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to
More majordomo info at


diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 28d968088131..53a14ee8ad6d 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -64,7 +64,8 @@  static void of_gpio_flags_quirks(struct device_node *np,
 	 * Note that active low is the default.
-	    (of_device_is_compatible(np, "reg-fixed-voltage") ||
+	    (of_device_is_compatible(np, "regulator-fixed") ||
+	     of_device_is_compatible(np, "reg-fixed-voltage") ||
 	     of_device_is_compatible(np, "regulator-gpio"))) {
 		 * The regulator GPIO handles are specified such that the