mmc: spi: Convert to use GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 2 Dec 2018 08:43:18 +0000 (09:43 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 17 Dec 2018 07:26:24 +0000 (08:26 +0100)
commit5716fb9bd9c6d3e56da07d6ed219dfcfce7d7006
tree6e9b2496a59427fb423fab35e87bacce07df0a7d
parentb0d06f1cb0e2079a3c64fb6e27c19d9a55c723a1
mmc: spi: Convert to use GPIO descriptors

Switch the SPI MMC driver to use GPIO descriptors internally
and just look those up using the standard slot GPIO
functions mmc_gpiod_request_cd() and mmc_gpiod_request_ro().
Make sure to request index 0 and 1 in accordance with the
SPI MMC DT binding, and add the same GPIOs in machine
descriptor tables on all boards that use SPI MMC in
board files.

The lines are flagged as GPIO_ACTIVE_[LOW|HIGH] as that is
what they are, and since we can now rely on the descriptors
to have the right polarity, we set the
"override_active_level" to false in mmc_gpiod_request_cd()
and mmc_gpiod_request_ro().

Cc: Hartley Sweeten <hsweeten@visionengravers.com> # Vision EP9307
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
arch/arm/mach-ep93xx/simone.c
arch/arm/mach-ep93xx/vision_ep9307.c
arch/sh/boards/mach-ecovec24/setup.c
drivers/mmc/host/mmc_spi.c
drivers/mmc/host/of_mmc_spi.c
include/linux/spi/mmc_spi.h