linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: arizona: switch to using devm_gpiod_get()
@ 2019-10-03  0:28 Dmitry Torokhov
  2019-10-03  9:15 ` Charles Keepax
  2019-10-16  9:48 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2019-10-03  0:28 UTC (permalink / raw)
  To: Lee Jones; +Cc: Mark Brown, Charles Keepax, linux-kernel

Now that gpiolib recognizes wlf,reset legacy GPIO and will handle it
even if DTS uses it without -gpio[s] suffix, we can switch to more
standard devm_gpiod_get() and later remove devm_gpiod_get_from_of_node().

Note that we will lose "arizona /RESET" custom GPIO label, but since we
do not set such custom label when using the modern binding, I opted to
not having it here either.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/mfd/arizona-core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 4a31907a4525..f73cf76d1373 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -814,11 +814,7 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
 	int ret, i;
 
 	/* Handle old non-standard DT binding */
-	pdata->reset = devm_gpiod_get_from_of_node(arizona->dev,
-						   arizona->dev->of_node,
-						   "wlf,reset", 0,
-						   GPIOD_OUT_LOW,
-						   "arizona /RESET");
+	pdata->reset = devm_gpiod_get(arizona->dev, "wlf,reset", GPIOD_OUT_LOW);
 	if (IS_ERR(pdata->reset)) {
 		ret = PTR_ERR(pdata->reset);
 
-- 
2.23.0.444.g18eeb5a265-goog


-- 
Dmitry

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

* Re: [PATCH] mfd: arizona: switch to using devm_gpiod_get()
  2019-10-03  0:28 [PATCH] mfd: arizona: switch to using devm_gpiod_get() Dmitry Torokhov
@ 2019-10-03  9:15 ` Charles Keepax
  2019-10-16  9:48 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2019-10-03  9:15 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Lee Jones, Mark Brown, linux-kernel

On Wed, Oct 02, 2019 at 05:28:32PM -0700, Dmitry Torokhov wrote:
> Now that gpiolib recognizes wlf,reset legacy GPIO and will handle it
> even if DTS uses it without -gpio[s] suffix, we can switch to more
> standard devm_gpiod_get() and later remove devm_gpiod_get_from_of_node().
> 
> Note that we will lose "arizona /RESET" custom GPIO label, but since we
> do not set such custom label when using the modern binding, I opted to
> not having it here either.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

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

* Re: [PATCH] mfd: arizona: switch to using devm_gpiod_get()
  2019-10-03  0:28 [PATCH] mfd: arizona: switch to using devm_gpiod_get() Dmitry Torokhov
  2019-10-03  9:15 ` Charles Keepax
@ 2019-10-16  9:48 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2019-10-16  9:48 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Mark Brown, Charles Keepax, linux-kernel

On Wed, 02 Oct 2019, Dmitry Torokhov wrote:

> Now that gpiolib recognizes wlf,reset legacy GPIO and will handle it
> even if DTS uses it without -gpio[s] suffix, we can switch to more
> standard devm_gpiod_get() and later remove devm_gpiod_get_from_of_node().
> 
> Note that we will lose "arizona /RESET" custom GPIO label, but since we
> do not set such custom label when using the modern binding, I opted to
> not having it here either.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/mfd/arizona-core.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2019-10-16  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03  0:28 [PATCH] mfd: arizona: switch to using devm_gpiod_get() Dmitry Torokhov
2019-10-03  9:15 ` Charles Keepax
2019-10-16  9:48 ` Lee Jones

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).