]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: sunxi: Use DM_GPIO flags to set pull-up
authorSamuel Holland <samuel@sholland.org>
Thu, 21 Oct 2021 04:52:57 +0000 (23:52 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Sun, 30 Jan 2022 01:25:00 +0000 (01:25 +0000)
Now that the sunxi_gpio driver handles pull-up/down via the driver
model, pin configuration does not need a platform-specific function.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
drivers/mmc/sunxi_mmc.c

index 4bf8a9b92ce374035c88fd0d3058e1fd693762e1..1bb7b6d0e92bb44c281b20f15b5dff8744c0b635 100644 (file)
@@ -702,12 +702,8 @@ static int sunxi_mmc_probe(struct udevice *dev)
                return ret;
 
        /* This GPIO is optional */
-       if (!gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio,
-                                 GPIOD_IS_IN)) {
-               int cd_pin = gpio_get_number(&priv->cd_gpio);
-
-               sunxi_gpio_set_pull(cd_pin, SUNXI_GPIO_PULL_UP);
-       }
+       gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio,
+                            GPIOD_IS_IN | GPIOD_PULL_UP);
 
        upriv->mmc = &plat->mmc;