diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2005-09-06 15:19:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 16:57:54 -0700 |
commit | 3870ee8c63d5e55aea990654dfeb231264e13134 (patch) | |
tree | d8efa858fd922054af0cf1ef10d7a8c938d401e0 /arch/arm/mach-pxa | |
parent | f7ceff348bbd2ef35b5bc2ab47541dcac4b0b8ea (diff) | |
download | op-kernel-dev-3870ee8c63d5e55aea990654dfeb231264e13134.zip op-kernel-dev-3870ee8c63d5e55aea990654dfeb231264e13134.tar.gz |
[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 <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 47da9fe..29185ac 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -190,6 +190,11 @@ static void corgi_mci_setpower(struct device *dev, unsigned int vdd) } } +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 *dev, void *data) 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, }; |