mfd: arizona: Switch to using devm_gpiod_get()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 3 Oct 2019 00:28:32 +0000 (17:28 -0700)
committerLee Jones <lee.jones@linaro.org>
Mon, 11 Nov 2019 08:45:02 +0000 (08:45 +0000)
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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/arizona-core.c

index 4a31907a4525fabf7e59f188ddc48e3e5006b935..f73cf76d1373d087c72143bc136ea3b1c5f6cb24 100644 (file)
@@ -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);