[U-Boot] [PATCH] mmc: sunxi: Fix misuse of gpio_direction_input()

Axel Lin axel.lin at ingics.com
Mon Dec 22 15:08:56 CET 2014


2014-12-22 20:59 GMT+08:00 Ian Campbell <ijc at hellion.org.uk>:
> On Sun, 2014-12-21 at 11:53 -0700, Simon Glass wrote:
>> On 19 December 2014 at 20:41, Axel Lin <axel.lin at ingics.com> wrote:
>> > It does not make sense to make gpio_direction_input() return the gpio input
>> > status. The return value of gpio_direction_input() is inconsistent if
>> > CONFIG_DM_GPIO is defined.
>> > And we don't need to call gpio_direction_input() int sunxi_mmc_getcd().
>> > Just init the gpio once in mmc_resource_init() is enough.
>> >
>> > Signed-off-by: Axel Lin <axel.lin at ingics.com>
>> > ---
>> > Only compile tested, so please test this patch.
>> > Thanks.
>> >  drivers/gpio/sunxi_gpio.c | 2 +-
>> >  drivers/mmc/sunxi_mmc.c   | 7 +++++--
>> >  2 files changed, 6 insertions(+), 3 deletions(-)
>>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> Thanks, I booted it on my cubietruck and I could still see the mmc, so
> I've queued to u-boot-sunxi#next.
>
> I don't think we need to rush this into v2015.01, but do shout if you
> think we do.

Hi Ian,
It's fine for v2015.01.

Thanks,
Axel


More information about the U-Boot mailing list