aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2019-02-20 12:24:30 +0100
committerLinus Walleij <[email protected]>2019-02-21 13:12:04 +0100
commit21b4ab8f9e7100286c380a13e0e46ca6bf35e692 (patch)
treeb0a22e4ebf25a912046e6b6cdf9cb497abc610a8
parent692ef26e72fcce0c1e73c41683fd3512f3719d55 (diff)
gpio: of: Handle both enable-gpio{,s}
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]>
-rw-r--r--drivers/gpio/gpiolib-of.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 950d3d6b2b7f..662c6f363ac2 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