From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Mon, 22 Dec 2014 12:59:00 +0000 Subject: [U-Boot] [PATCH] mmc: sunxi: Fix misuse of gpio_direction_input() In-Reply-To: References: <1419046885.12841.1.camel@phoenix> Message-ID: <1419253140.26985.179.camel@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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 > > --- > > 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 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. Ian.