linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: of: Handle both enable-gpio{,s}
@ 2019-02-20 11:24 marek.vasut
  2019-02-21 12:13 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: marek.vasut @ 2019-02-20 11:24 UTC (permalink / raw)
  To: linux-gpio
  Cc: Marek Vasut, Geert Uytterhoeven, Jan Kotas, Linus Walleij,
	Mark Brown, Thierry Reding, Wolfram Sang, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

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 <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Jan Kotas <jank@cadence.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org
To: linux-gpio@vger.kernel.org
---
 drivers/gpio/gpiolib-of.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index bddfc6102a50..8b9c3ab70f6e 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
-- 
2.19.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: of: Handle both enable-gpio{,s}
  2019-02-20 11:24 [PATCH] gpio: of: Handle both enable-gpio{,s} marek.vasut
@ 2019-02-21 12:13 ` Linus Walleij
  2019-02-21 12:47   ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2019-02-21 12:13 UTC (permalink / raw)
  To: Mark Vasut
  Cc: open list:GPIO SUBSYSTEM, Marek Vasut, Geert Uytterhoeven,
	Jan Kotas, Mark Brown, Thierry Reding, Wolfram Sang,
	Linux-Renesas

On Wed, Feb 20, 2019 at 12:24 PM <marek.vasut@gmail.com> wrote:

> From: Marek Vasut <marek.vasut+renesas@gmail.com>
>
> 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 <marek.vasut+renesas@gmail.com>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Jan Kotas <jank@cadence.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Thierry Reding <treding@nvidia.com>
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: linux-renesas-soc@vger.kernel.org
> To: linux-gpio@vger.kernel.org

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

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: of: Handle both enable-gpio{,s}
  2019-02-21 12:13 ` Linus Walleij
@ 2019-02-21 12:47   ` Marek Vasut
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2019-02-21 12:47 UTC (permalink / raw)
  To: Linus Walleij
  Cc: open list:GPIO SUBSYSTEM, Marek Vasut, Geert Uytterhoeven,
	Jan Kotas, Mark Brown, Thierry Reding, Wolfram Sang,
	Linux-Renesas

On 2/21/19 1:13 PM, Linus Walleij wrote:
> On Wed, Feb 20, 2019 at 12:24 PM <marek.vasut@gmail.com> wrote:
> 
>> From: Marek Vasut <marek.vasut+renesas@gmail.com>
>>
>> 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 <marek.vasut+renesas@gmail.com>
>> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
>> Cc: Jan Kotas <jank@cadence.com>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: Mark Brown <broonie@kernel.org>
>> Cc: Thierry Reding <treding@nvidia.com>
>> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
>> Cc: linux-renesas-soc@vger.kernel.org
>> To: linux-gpio@vger.kernel.org
> 
> This patch applied on top of Thierry's patch (which worked fine
> so I guess this order was implied).

Jupp, thanks!

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-21 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 11:24 [PATCH] gpio: of: Handle both enable-gpio{,s} marek.vasut
2019-02-21 12:13 ` Linus Walleij
2019-02-21 12:47   ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).