aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-12-02 03:43:18 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2018-12-17 02:26:24 -0500
commit5716fb9bd9c6d3e56da07d6ed219dfcfce7d7006 (patch)
tree6e9b2496a59427fb423fab35e87bacce07df0a7d /include/linux
parentb0d06f1cb0e2079a3c64fb6e27c19d9a55c723a1 (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/spi/mmc_spi.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h
index bfde741a543d..778ae8eb1f3e 100644
--- a/include/linux/spi/mmc_spi.h
+++ b/include/linux/spi/mmc_spi.h
@@ -8,11 +8,6 @@
8struct device; 8struct device;
9struct mmc_host; 9struct mmc_host;
10 10
11#define MMC_SPI_USE_CD_GPIO (1 << 0)
12#define MMC_SPI_USE_RO_GPIO (1 << 1)
13#define MMC_SPI_CD_GPIO_ACTIVE_LOW (1 << 2)
14#define MMC_SPI_RO_GPIO_ACTIVE_LOW (1 << 3)
15
16/* Put this in platform_data of a device being used to manage an MMC/SD 11/* Put this in platform_data of a device being used to manage an MMC/SD
17 * card slot. (Modeled after PXA mmc glue; see that for usage examples.) 12 * card slot. (Modeled after PXA mmc glue; see that for usage examples.)
18 * 13 *
@@ -27,16 +22,6 @@ struct mmc_spi_platform_data {
27 void *); 22 void *);
28 void (*exit)(struct device *, void *); 23 void (*exit)(struct device *, void *);
29 24
30 /*
31 * Card Detect and Read Only GPIOs. To enable debouncing on the card
32 * detect GPIO, set the cd_debounce to the debounce time in
33 * microseconds.
34 */
35 unsigned int flags;
36 unsigned int cd_gpio;
37 unsigned int cd_debounce;
38 unsigned int ro_gpio;
39
40 /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */ 25 /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */
41 unsigned long caps; 26 unsigned long caps;
42 unsigned long caps2; 27 unsigned long caps2;