]> asedeno.scripts.mit.edu Git - linux.git/commit
mmc: tmio: support IP-builtin card detection logic
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 17 Jan 2018 16:28:12 +0000 (01:28 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 5 Mar 2018 12:03:16 +0000 (13:03 +0100)
commit497d1f965c207f1d670066e9c87a2ffad1ce4e5e
tree00468aeab8231deb9f1d1c9d26cd832351770ba1
parent788778b0d21a6d5cd5bc6c880591119e17932327
mmc: tmio: support IP-builtin card detection logic

A card detect GPIO is set up only for platforms with "cd-gpios"
DT property or TMIO_MMC_USE_GPIO_CD flag.  However, the driver
core always uses mmc_gpio_get_cd, which just fails with -ENOSYS
if ctx->cd_gpio is unset.

The bit 5 of the status register provides the current signal level
of the CD line.  Allow to use it if the GPIO is unused.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/mmc/host/tmio_mmc_core.c