tree d8efa858fd922054af0cf1ef10d7a8c938d401e0
parent f7ceff348bbd2ef35b5bc2ab47541dcac4b0b8ea
author Richard Purdie <[EMAIL PROTECTED]> Wed, 07 Sep 2005 05:19:07 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 08 Sep 2005 06:57:54 -0700

[PATCH] Corgi: Add MMC/SD write protection switch handling

Add MMC/SD write protection switch handling for the Corgi platform

Signed-off-by: Richard Purdie <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 arch/arm/mach-pxa/corgi.c |    6 ++++++
 1 files changed, 6 insertions(+)

diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -190,6 +190,11 @@ static void corgi_mci_setpower(struct de
        }
 }
 
+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);
@@ -199,6 +204,7 @@ static void corgi_mci_exit(struct device
 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,
 };
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to