aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-04 11:10:52 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2009-12-13 13:21:40 -0500
commit6a6127462eb9096419fd4b3115ec5971d83a600f (patch)
tree8d7050226d8bcdbbe98f13c3ec90d62c4969879a /drivers/rtc
parent5a65edbc12b6b34ef912114f1fc8215786f85b25 (diff)
mfd: Mask and unmask wm8350 IRQs on request and free
Bring the WM8350 IRQ API more in line with the generic IRQ API by masking and unmasking interrupts as they are requested and freed. This is mostly just a case of deleting the mask and unmask calls from the individual drivers. The RTC driver is changed to mask the periodic IRQ after requesting it rather than only unmasking the alarm IRQ. If the periodic IRQ fires in the period where it is reqested then there will be a spurious notification but there should be no serious consequences from this. The CODEC drive is changed to explicitly disable headphone jack detection prior to requesting the IRQs. This will avoid the IRQ firing with no jack set up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-wm8350.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c
index 56e56e552813..f16486635a8e 100644
--- a/drivers/rtc/rtc-wm8350.c
+++ b/drivers/rtc/rtc-wm8350.c
@@ -459,17 +459,14 @@ static int wm8350_rtc_probe(struct platform_device *pdev)
459 return ret; 459 return ret;
460 } 460 }
461 461
462 wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
463 wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_PER);
464
465 wm8350_register_irq(wm8350, WM8350_IRQ_RTC_SEC, 462 wm8350_register_irq(wm8350, WM8350_IRQ_RTC_SEC,
466 wm8350_rtc_update_handler, 0, 463 wm8350_rtc_update_handler, 0,
467 "RTC Seconds", wm8350); 464 "RTC Seconds", wm8350);
465 wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
468 466
469 wm8350_register_irq(wm8350, WM8350_IRQ_RTC_ALM, 467 wm8350_register_irq(wm8350, WM8350_IRQ_RTC_ALM,
470 wm8350_rtc_alarm_handler, 0, 468 wm8350_rtc_alarm_handler, 0,
471 "RTC Alarm", wm8350); 469 "RTC Alarm", wm8350);
472 wm8350_unmask_irq(wm8350, WM8350_IRQ_RTC_ALM);
473 470
474 return 0; 471 return 0;
475} 472}
@@ -479,8 +476,6 @@ static int __devexit wm8350_rtc_remove(struct platform_device *pdev)
479 struct wm8350 *wm8350 = platform_get_drvdata(pdev); 476 struct wm8350 *wm8350 = platform_get_drvdata(pdev);
480 struct wm8350_rtc *wm_rtc = &wm8350->rtc; 477 struct wm8350_rtc *wm_rtc = &wm8350->rtc;
481 478
482 wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
483
484 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC); 479 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC);
485 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM); 480 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM);
486 481