[PATCH] mmc: mmci.c: Defer probe() in case of missing GPIOs

Russell King - ARM Linux linux at arm.linux.org.uk
Sat Jun 16 10:26:52 EDT 2012


On Sat, Jun 16, 2012 at 04:14:59PM +0200, Roland Stigge wrote:
> If the GPIOs used by the MMCI driver are not registered yet when the
> driver is probe()d, they can't be used. This happens if the mmci driver
> is probed before the respective GPIO controller (e.g. on the LPC32xx
> EA3250 board, the PCA9532 GPIO controller would be initialized via DT
> after mmci). Therefore, we defer mmci in this case.

This code is wrong.  There are platforms where plat->gpio_cd is negative
(because there isn't an associated GPIO) and we still expect the driver
to successfully bind.  In that case, the driver gets the CD and WP
information via the status callback.

So this is an incompatible change with existing (and required) driver
behaviour.



More information about the linux-arm-kernel mailing list