* [patch] Corgi: Add MMC/SD write protection switch handling
@ 2005-08-04 23:52 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2005-08-04 23:52 UTC (permalink / raw)
To: Andrew Morton; +Cc: Russell King, Nicolas Pitre, LKML
Add MMC/SD write protection switch handling for the Corgi platform
(extending the MMC/SD patches in -mm).
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Index: linux-2.6.12/arch/arm/mach-pxa/corgi.c
===================================================================
--- linux-2.6.12.orig/arch/arm/mach-pxa/corgi.c 2005-08-05 00:29:17.000000000 +0100
+++ linux-2.6.12/arch/arm/mach-pxa/corgi.c 2005-08-05 00:29:45.000000000 +0100
@@ -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,
};
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-08-04 23:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-04 23:52 [patch] Corgi: Add MMC/SD write protection switch handling Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome