mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 14:41:26 +01:00
sunxi: mmc: Enable pull-up on card-detect gpio pin
On some boards we need to enable the internal pull-up te reliable detect that no card is inserted. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
d8abb46b37
commit
1c09fa38e0
@ -75,9 +75,11 @@ static int mmc_resource_init(int sdc_no)
|
|||||||
cd_pin = sunxi_mmc_getcd_gpio(sdc_no);
|
cd_pin = sunxi_mmc_getcd_gpio(sdc_no);
|
||||||
if (cd_pin >= 0) {
|
if (cd_pin >= 0) {
|
||||||
ret = gpio_request(cd_pin, "mmc_cd");
|
ret = gpio_request(cd_pin, "mmc_cd");
|
||||||
if (!ret)
|
if (!ret) {
|
||||||
|
sunxi_gpio_set_pull(cd_pin, SUNXI_GPIO_PULL_UP);
|
||||||
ret = gpio_direction_input(cd_pin);
|
ret = gpio_direction_input(cd_pin);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user