Corgi: Add MMC/SD write protection switch handling
Subsystems (3)
PATCH 1/1 Corgi: Add MMC/SD write protection switch handling
Add MMC/SD write protection switch handling for the Corgi platform (extending the MMC/SD patches in -mm).
Signed-off-by Richard Purdie <[email protected]>
arch/arm/mach-pxa/corgi.c +6 -0
@@ -160,6 +160,11 @@ } } +static int corgi_mci_get_ro (struct device *dev) +{ +return GPLR (CORGI_GPIO_nSD_WP) &GPIO_bit (CORGI_GPIO_nSD_WP); +} +static void corgi_mci_exit (struct device *dev,void *data) {free_irq (CORGI_IRQ_GPIO_nSD_DETECT, data);
@@ -169,6 +174,7 @@static struct pxamci_platform_data corgi_mci_platform_data = { .ocr_mask =MMC_VDD_32_33 |MMC_VDD_33_34 , .init = corgi_mci_init, + .get_ro = corgi_mci_get_ro, .setpower = corgi_mci_setpower, .exit = corgi_mci_exit, };