summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-04 16:10:52 +0000
committerSamuel Ortiz <sameo@linux.intel.com>2009-12-13 19:21:40 +0100
commit6a6127462eb9096419fd4b3115ec5971d83a600f (patch)
tree8d7050226d8bcdbbe98f13c3ec90d62c4969879a /sound
parent5a65edbc12b6b34ef912114f1fc8215786f85b25 (diff)
downloadlinux-6a6127462eb9096419fd4b3115ec5971d83a600f.tar.gz
linux-6a6127462eb9096419fd4b3115ec5971d83a600f.tar.bz2
linux-6a6127462eb9096419fd4b3115ec5971d83a600f.zip
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 'sound')
-rw-r--r--sound/soc/codecs/wm8350.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 17a327d67fd5..ebbf11b653a4 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -1426,8 +1426,6 @@ int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which,
/* Sync status */
wm8350_hp_jack_handler(irq, priv);
- wm8350_unmask_irq(wm8350, irq);
-
return 0;
}
EXPORT_SYMBOL_GPL(wm8350_hp_jack_detect);
@@ -1485,8 +1483,10 @@ static int wm8350_probe(struct platform_device *pdev)
wm8350_set_bits(wm8350, WM8350_ROUT2_VOLUME,
WM8350_OUT2_VU | WM8350_OUT2R_MUTE);
- wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L);
- wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R);
+ /* Make sure jack detect is disabled to start off with */
+ wm8350_clear_bits(wm8350, WM8350_JACK_DETECT,
+ WM8350_JDL_ENA | WM8350_JDR_ENA);
+
wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L,
wm8350_hp_jack_handler, 0, "Left jack detect",
priv);
@@ -1521,8 +1521,6 @@ static int wm8350_remove(struct platform_device *pdev)
WM8350_JDL_ENA | WM8350_JDR_ENA);
wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_4, WM8350_TOCLK_ENA);
- wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L);
- wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R);
wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L);
wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R);