提交 1c09fa38 编写于 作者: H Hans de Goede

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: NHans de Goede <hdegoede@redhat.com>
上级 d8abb46b
......@@ -75,8 +75,10 @@ static int mmc_resource_init(int sdc_no)
cd_pin = sunxi_mmc_getcd_gpio(sdc_no);
if (cd_pin >= 0) {
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);
}
}
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册