Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: dm355 evm MMC/SD card detection

Support card detect and writeprotect switches on DM355 EVM.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>

authored by

David Brownell and committed by
Samuel Ortiz
d1fdb4f6 5ec271e7

+10
+10
drivers/mfd/dm355evm_msp.c
··· 107 107 MSP_GPIO(0, SWITCH1), MSP_GPIO(1, SWITCH1), 108 108 MSP_GPIO(2, SWITCH1), MSP_GPIO(3, SWITCH1), 109 109 MSP_GPIO(4, SWITCH1), 110 + /* switches on MMC/SD sockets */ 111 + MSP_GPIO(1, SDMMC), MSP_GPIO(2, SDMMC), /* mmc0 WP, nCD */ 112 + MSP_GPIO(3, SDMMC), MSP_GPIO(4, SDMMC), /* mmc1 WP, nCD */ 110 113 }; 111 114 112 115 #define MSP_GPIO_REG(offset) (msp_gpios[(offset)] >> 3) ··· 305 302 306 303 /* make it easy for userspace to see these */ 307 304 gpio_export(gpio, false); 305 + } 306 + 307 + /* MMC/SD inputs -- right after the last config input */ 308 + if (client->dev.platform_data) { 309 + void (*mmcsd_setup)(unsigned) = client->dev.platform_data; 310 + 311 + mmcsd_setup(dm355evm_msp_gpio.base + 8 + 5); 308 312 } 309 313 310 314 /* RTC is a 32 bit counter, no alarm */