Commit 1c09fa38e0460a1498110fa418ba5900b9aef2c2
1 parent
d8abb46b37
Exists in
v2017.01-smarct4x
and in
34 other branches
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>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
drivers/mmc/sunxi_mmc.c
... | ... | @@ -75,8 +75,10 @@ |
75 | 75 | cd_pin = sunxi_mmc_getcd_gpio(sdc_no); |
76 | 76 | if (cd_pin >= 0) { |
77 | 77 | ret = gpio_request(cd_pin, "mmc_cd"); |
78 | - if (!ret) | |
78 | + if (!ret) { | |
79 | + sunxi_gpio_set_pull(cd_pin, SUNXI_GPIO_PULL_UP); | |
79 | 80 | ret = gpio_direction_input(cd_pin); |
81 | + } | |
80 | 82 | } |
81 | 83 | |
82 | 84 | return ret; |