aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/littleton.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2009-07-13 10:57:56 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 06:49:30 -0400
commit70f6d3e8a6670d1cccab5e206315b935eb62a08e (patch)
tree82036f1a3faf37101ebdf6ee42b31755d6ca058f /arch/arm/mach-pxa/littleton.c
parent7a648256b20c493c99757fe1d248daf7954647bc (diff)
[ARM] pxa/littleton: update littleton to use the new gpio_card_detect for mmc
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/littleton.c')
-rw-r--r--arch/arm/mach-pxa/littleton.c43
1 files changed, 5 insertions, 38 deletions
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 55b3788fd1ae..13848955d133 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -265,45 +265,12 @@ static inline void littleton_init_keypad(void) {}
265#endif 265#endif
266 266
267#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) 267#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
268static int littleton_mci_init(struct device *dev,
269 irq_handler_t littleton_detect_int, void *data)
270{
271 int err, gpio_cd = GPIO_MMC1_CARD_DETECT;
272
273 err = gpio_request(gpio_cd, "mmc card detect");
274 if (err)
275 goto err_request_cd;
276
277 gpio_direction_input(gpio_cd);
278
279 err = request_irq(gpio_to_irq(gpio_cd), littleton_detect_int,
280 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
281 "mmc card detect", data);
282 if (err) {
283 dev_err(dev, "failed to request card detect IRQ\n");
284 goto err_request_irq;
285 }
286 return 0;
287
288err_request_irq:
289 gpio_free(gpio_cd);
290err_request_cd:
291 return err;
292}
293
294static void littleton_mci_exit(struct device *dev, void *data)
295{
296 int gpio_cd = GPIO_MMC1_CARD_DETECT;
297
298 free_irq(gpio_to_irq(gpio_cd), data);
299 gpio_free(gpio_cd);
300}
301
302static struct pxamci_platform_data littleton_mci_platform_data = { 268static struct pxamci_platform_data littleton_mci_platform_data = {
303 .detect_delay = 20, 269 .detect_delay = 20,
304 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 270 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
305 .init = littleton_mci_init, 271 .gpio_card_detect = GPIO_MMC1_CARD_DETECT,
306 .exit = littleton_mci_exit, 272 .gpio_card_ro = -1,
273 .gpio_power = -1,
307}; 274};
308 275
309static void __init littleton_init_mmc(void) 276static void __init littleton_init_mmc(void)