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

2014-12-22 Thread Axel Lin
2014-12-22 20:59 GMT+08:00 Ian Campbell : > On Sun, 2014-12-21 at 11:53 -0700, Simon Glass wrote: >> On 19 December 2014 at 20:41, Axel Lin wrote: >> > It does not make sense to make gpio_direction_input() return the gpio input >> > status. The return value of gpio_direction_input() is inconsisten

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

2014-12-22 Thread Ian Campbell
On Sun, 2014-12-21 at 11:53 -0700, Simon Glass wrote: > On 19 December 2014 at 20:41, Axel Lin 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

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

2014-12-21 Thread Simon Glass
On 19 December 2014 at 20:41, Axel Lin 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().

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

2014-12-19 Thread Axel Lin
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 enou