Commit d1fdb4f6 authored by David Brownell's avatar David Brownell Committed by Samuel Ortiz

mfd: dm355 evm MMC/SD card detection

Support card detect and writeprotect switches on DM355 EVM.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@openedhand.com>
parent 5ec271e7
...@@ -107,6 +107,9 @@ static const u8 msp_gpios[] = { ...@@ -107,6 +107,9 @@ static const u8 msp_gpios[] = {
MSP_GPIO(0, SWITCH1), MSP_GPIO(1, SWITCH1), MSP_GPIO(0, SWITCH1), MSP_GPIO(1, SWITCH1),
MSP_GPIO(2, SWITCH1), MSP_GPIO(3, SWITCH1), MSP_GPIO(2, SWITCH1), MSP_GPIO(3, SWITCH1),
MSP_GPIO(4, SWITCH1), MSP_GPIO(4, SWITCH1),
/* switches on MMC/SD sockets */
MSP_GPIO(1, SDMMC), MSP_GPIO(2, SDMMC), /* mmc0 WP, nCD */
MSP_GPIO(3, SDMMC), MSP_GPIO(4, SDMMC), /* mmc1 WP, nCD */
}; };
#define MSP_GPIO_REG(offset) (msp_gpios[(offset)] >> 3) #define MSP_GPIO_REG(offset) (msp_gpios[(offset)] >> 3)
...@@ -304,6 +307,13 @@ static int add_children(struct i2c_client *client) ...@@ -304,6 +307,13 @@ static int add_children(struct i2c_client *client)
gpio_export(gpio, false); gpio_export(gpio, false);
} }
/* MMC/SD inputs -- right after the last config input */
if (client->dev.platform_data) {
void (*mmcsd_setup)(unsigned) = client->dev.platform_data;
mmcsd_setup(dm355evm_msp_gpio.base + 8 + 5);
}
/* RTC is a 32 bit counter, no alarm */ /* RTC is a 32 bit counter, no alarm */
if (msp_has_rtc()) { if (msp_has_rtc()) {
child = add_child(client, "rtc-dm355evm", child = add_child(client, "rtc-dm355evm",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment