mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
5a65edbc12
commit
6a6127462e
5 changed files with 9 additions and 41 deletions
|
|
@ -459,17 +459,14 @@ static int wm8350_rtc_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
|
||||
wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_PER);
|
||||
|
||||
wm8350_register_irq(wm8350, WM8350_IRQ_RTC_SEC,
|
||||
wm8350_rtc_update_handler, 0,
|
||||
"RTC Seconds", wm8350);
|
||||
wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
|
||||
|
||||
wm8350_register_irq(wm8350, WM8350_IRQ_RTC_ALM,
|
||||
wm8350_rtc_alarm_handler, 0,
|
||||
"RTC Alarm", wm8350);
|
||||
wm8350_unmask_irq(wm8350, WM8350_IRQ_RTC_ALM);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -479,8 +476,6 @@ static int __devexit wm8350_rtc_remove(struct platform_device *pdev)
|
|||
struct wm8350 *wm8350 = platform_get_drvdata(pdev);
|
||||
struct wm8350_rtc *wm_rtc = &wm8350->rtc;
|
||||
|
||||
wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
|
||||
|
||||
wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC);
|
||||
wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue