]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] wm9713: Don't control touch screen power on suspend
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 14 Apr 2008 13:27:30 +0000 (15:27 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:00:35 +0000 (12:00 +0200)
Leave the power bit for the touch screen alone when suspending the WM9713
so that the touch screen driver can handle it. This allows the touch
screen to be used as a wakeup source when the system is suspended.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/codecs/wm9713.c

index e3174c4d980d6d8d2d6852433ea301fc04796881..1f241161445ce423135c62adcc9e325d14d4bd05 100644 (file)
@@ -1132,8 +1132,17 @@ static int wm9713_soc_suspend(struct platform_device *pdev,
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
        struct snd_soc_codec *codec = socdev->codec;
+       u16 reg;
+
+       /* Disable everything except touchpanel - that will be handled
+        * by the touch driver and left disabled if touch is not in
+        * use. */
+       reg = ac97_read(codec, AC97_EXTENDED_MID);
+       ac97_write(codec, AC97_EXTENDED_MID, reg | 0x7fff);
+       ac97_write(codec, AC97_EXTENDED_MSTATUS, 0xffff);
+       ac97_write(codec, AC97_POWERDOWN, 0x6f00);
+       ac97_write(codec, AC97_POWERDOWN, 0xffff);
 
-       wm9713_dapm_event(codec, SNDRV_CTL_POWER_D3cold);
        return 0;
 }