]> git.baikalelectronics.ru Git - kernel.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)
commitd144170a529bab7e6387b3719d6ec797b5dec2ea
tree00468aeab8231deb9f1d1c9d26cd832351770ba1
parentc8e81b94f5923cc94ed69962e69d4a56da7c72f2
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