Commit f54005b5 authored by Linus Walleij's avatar Linus Walleij Committed by Ulf Hansson
Browse files

mmc: pxa: Use GPIO descriptor for power



After converting the PXA driver to use GPIO descriptors for
card detect and write protect it is relatively simple to
convert it to also use a descriptor for getting the optional
power control GPIO.

The polarity inversion flag can also go away from the platform
data since this is indicated in the GPIO machine descriptor
table.

Cc: Daniel Mack <daniel@zonque.org>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 80a68f38
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -290,7 +290,6 @@ static unsigned long balloon3_mmc_pin_config[] __initdata = {

static struct pxamci_platform_data balloon3_mci_platform_data = {
	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
	.gpio_power		= -1,
	.detect_delay_ms	= 200,
};

+3 −2
Original line number Diff line number Diff line
@@ -289,8 +289,6 @@ static inline void cmx270_init_ohci(void) {}
#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
static struct pxamci_platform_data cmx270_mci_platform_data = {
	.ocr_mask		= MMC_VDD_32_33|MMC_VDD_33_34,
	.gpio_power		= GPIO105_MMC_POWER,
	.gpio_power_invert	= 1,
};

static struct gpiod_lookup_table cmx270_mci_gpio_table = {
@@ -298,6 +296,9 @@ static struct gpiod_lookup_table cmx270_mci_gpio_table = {
	.table = {
		/* Card detect on GPIO 83 */
		GPIO_LOOKUP("gpio-pxa", GPIO83_MMC_IRQ, "cd", GPIO_ACTIVE_LOW),
		/* Power on GPIO 105 */
		GPIO_LOOKUP("gpio-pxa", GPIO105_MMC_POWER,
			    "power", GPIO_ACTIVE_LOW),
		{ },
	},
};
+0 −2
Original line number Diff line number Diff line
@@ -459,7 +459,6 @@ static inline void cm_x300_init_nand(void) {}
static struct pxamci_platform_data cm_x300_mci_platform_data = {
	.detect_delay_ms	= 200,
	.ocr_mask		= MMC_VDD_32_33|MMC_VDD_33_34,
	.gpio_power		= -1,
};

static struct gpiod_lookup_table cm_x300_mci_gpio_table = {
@@ -491,7 +490,6 @@ static struct pxamci_platform_data cm_x300_mci2_platform_data = {
	.ocr_mask		= MMC_VDD_32_33|MMC_VDD_33_34,
	.init 			= cm_x300_mci2_init,
	.exit			= cm_x300_mci2_exit,
	.gpio_power		= -1,
};

static void __init cm_x300_init_mmc(void)
+0 −1
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@
#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
static struct pxamci_platform_data income_mci_platform_data = {
	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
	.gpio_power		= -1,
	.detect_delay_ms	= 200,
};

+3 −1
Original line number Diff line number Diff line
@@ -494,7 +494,6 @@ static struct platform_device corgi_audio_device = {
static struct pxamci_platform_data corgi_mci_platform_data = {
	.detect_delay_ms	= 250,
	.ocr_mask		= MMC_VDD_32_33|MMC_VDD_33_34,
	.gpio_power		= CORGI_GPIO_SD_PWR,
};

static struct gpiod_lookup_table corgi_mci_gpio_table = {
@@ -506,6 +505,9 @@ static struct gpiod_lookup_table corgi_mci_gpio_table = {
		/* Write protect on GPIO 7 */
		GPIO_LOOKUP("gpio-pxa", CORGI_GPIO_nSD_WP,
			    "wp", GPIO_ACTIVE_LOW),
		/* Power on GPIO 33 */
		GPIO_LOOKUP("gpio-pxa", CORGI_GPIO_SD_PWR,
			    "power", GPIO_ACTIVE_HIGH),
		{ },
	},
};
Loading