aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-12-02 03:43:19 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2018-12-17 02:26:24 -0500
commitfaed9303067a0bd9d8ddb09c0de3bc742334773a (patch)
tree77439d206a3adfd5937dfb706fa03e47975d361e /include/linux
parent5716fb9bd9c6d3e56da07d6ed219dfcfce7d7006 (diff)
mmc: host: tmio: Use GPIO descriptors
The TMIO MMC driver was passing global GPIO numbers around for card detect. It turns out only one single board in the kernel was actually making use of this feature so it is pretty easy to convert the driver to use only GPIO descriptors. 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(). Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/tmio.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 1e70060c92ce..e2687a30e5a1 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -54,12 +54,8 @@
54 * idle before writing to some registers. 54 * idle before writing to some registers.
55 */ 55 */
56#define TMIO_MMC_HAS_IDLE_WAIT BIT(4) 56#define TMIO_MMC_HAS_IDLE_WAIT BIT(4)
57/* 57
58 * A GPIO is used for card hotplug detection. We need an extra flag for this, 58/* BIT(5) is unused */
59 * because 0 is a valid GPIO number too, and requiring users to specify
60 * cd_gpio < 0 to disable GPIO hotplug would break backwards compatibility.
61 */
62#define TMIO_MMC_USE_GPIO_CD BIT(5)
63 59
64/* 60/*
65 * Some controllers have CMD12 automatically 61 * Some controllers have CMD12 automatically
@@ -104,7 +100,6 @@ struct tmio_mmc_data {
104 unsigned long capabilities2; 100 unsigned long capabilities2;
105 unsigned long flags; 101 unsigned long flags;
106 u32 ocr_mask; /* available voltages */ 102 u32 ocr_mask; /* available voltages */
107 unsigned int cd_gpio;
108 int alignment_shift; 103 int alignment_shift;
109 dma_addr_t dma_rx_offset; 104 dma_addr_t dma_rx_offset;
110 unsigned int max_blk_count; 105 unsigned int max_blk_count;