]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
mmc: tmio: use mmc_can_gpio_cd() instead of checking TMIO_MMC_USE_GPIO_CD
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 24 Nov 2017 16:24:44 +0000 (01:24 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 12 Jan 2018 14:15:54 +0000 (15:15 +0100)
commitde21dc1d9a2a9fc5023c1fe3a24ba21e68c34928
treed7972cecd24ff73f6c8715dfe426280a2902d11a
parent2a609abe71ca59e4bd7139e161eaca2144ae6f2e
mmc: tmio: use mmc_can_gpio_cd() instead of checking TMIO_MMC_USE_GPIO_CD

To use a GPIO line for card detection, TMIO_MMC_USE_GPIO_CD is set
by a legacy board (arch/sh/boards/mach-ecovec24).

For DT platforms, the "cd-gpios" property is a legitimate way for that
in case the IP-builtin card detection can not be used for some reason.
mmc_of_parse() calls mmc_gpiod_request_cd() to set up ctx->cd_gpio if
the "cd-gpios" property is specified.

To cater to both cases, mmc_can_gpio_cd() is a correct way to check
which card detection logic is used.

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>
drivers/mmc/host/tmio_mmc_core.c