Skip to contentSkip to conversation

mfd: arizona: switch to using devm_gpiod_get()

PATCH Applied Dmitry Torokhov 3 participants 3 messages Oct 3, 2019 – Oct 16, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: arizona: switch to using devm_gpiod_get()

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.

---
 drivers/mfd/arizona-core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/mfd/arizona-core.c +1 -5
index 4a31907a4525..f73cf76d1373 100644
@@ -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);
 
Signature · 5 lines
2.23.0.444.g18eeb5a265-goog


-- 
Dmitry
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Dmitry Torokhov

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.

---

Thanks,
Charles

Applied
#2 lore raw
In reply to Dmitry Torokhov
Quoted 4 lines · Dmitry Torokhov

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

Quoted 8 lines

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.

---
 drivers/mfd/arizona-core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Applied, thanks.

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