1 From 148a1026b1975e3a50981cf7df3d4aae2b34611e Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Sun, 13 Apr 2008 07:23:53 +0100
4 Subject: [PATCH] iis-suspend.patch
7 sound/soc/s3c24xx/s3c24xx-i2s.c | 38 ++++++++++++++++++++++++++++++++++++++
8 1 files changed, 38 insertions(+), 0 deletions(-)
10 diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
11 index fe30e0d..4d74cc0 100644
12 --- a/sound/soc/s3c24xx/s3c24xx-i2s.c
13 +++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
14 @@ -76,6 +76,10 @@ static struct s3c24xx_pcm_dma_params s3c24xx_i2s_pcm_stereo_in = {
15 struct s3c24xx_i2s_info {
23 static struct s3c24xx_i2s_info s3c24xx_i2s;
25 @@ -406,6 +410,38 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev)
30 +int s3c24xx_i2s_suspend(struct platform_device *pdev,
31 + struct snd_soc_cpu_dai *cpu_dai)
33 + s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
34 + s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
35 + s3c24xx_i2s.iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON);
36 + s3c24xx_i2s.iispsr = readl(s3c24xx_i2s.regs + S3C2410_IISPSR);
38 + clk_disable(s3c24xx_i2s.iis_clk);
43 +int s3c24xx_i2s_resume(struct platform_device *pdev,
44 + struct snd_soc_cpu_dai *cpu_dai)
46 + clk_enable(s3c24xx_i2s.iis_clk);
48 + writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON);
49 + writel(s3c24xx_i2s.iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
50 + writel(s3c24xx_i2s.iisfcon, s3c24xx_i2s.regs + S3C2410_IISFCON);
51 + writel(s3c24xx_i2s.iispsr, s3c24xx_i2s.regs + S3C2410_IISPSR);
56 +#define s3c24xx_i2s_suspend NULL
57 +#define s3c24xx_i2s_resume NULL
61 #define S3C24XX_I2S_RATES \
62 (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_16000 | \
63 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
64 @@ -416,6 +452,8 @@ struct snd_soc_cpu_dai s3c24xx_i2s_dai = {
66 .type = SND_SOC_DAI_I2S,
67 .probe = s3c24xx_i2s_probe,
68 + .suspend = s3c24xx_i2s_suspend,
69 + .resume = s3c24xx_i2s_resume,