r3906 - branches/src/target/kernel/2.6.24.x/patches
werner at sita.openmoko.org
werner at sita.openmoko.org
Mon Jan 21 22:28:51 CET 2008
Author: werner
Date: 2008-01-21 22:28:47 +0100 (Mon, 21 Jan 2008)
New Revision: 3906
Added:
branches/src/target/kernel/2.6.24.x/patches/iis-suspend.patch
Modified:
branches/src/target/kernel/2.6.24.x/patches/series
Log:
"Lost OE" patch iis-suspend.patch (by Graeme Gregory)
This one adds power management support to the S3C24xx I2S driver.
series: added iis-suspend.patch
iis-suspend.patch:
- sound/soc/s3c24xx/s3c24xx-i2s.c (s3c24xx_i2s_suspend, s3c24xx_i2s_resume):
added power management support
Added: branches/src/target/kernel/2.6.24.x/patches/iis-suspend.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/iis-suspend.patch 2008-01-21 21:13:30 UTC (rev 3905)
+++ branches/src/target/kernel/2.6.24.x/patches/iis-suspend.patch 2008-01-21 21:28:47 UTC (rev 3906)
@@ -0,0 +1,63 @@
+Index: linux-2.6.24-rc7/sound/soc/s3c24xx/s3c24xx-i2s.c
+===================================================================
+--- linux-2.6.24-rc7.orig/sound/soc/s3c24xx/s3c24xx-i2s.c
++++ linux-2.6.24-rc7/sound/soc/s3c24xx/s3c24xx-i2s.c
+@@ -76,6 +76,10 @@
+ struct s3c24xx_i2s_info {
+ void __iomem *regs;
+ struct clk *iis_clk;
++ u32 iiscon;
++ u32 iismod;
++ u32 iisfcon;
++ u32 iispsr;
+ };
+ static struct s3c24xx_i2s_info s3c24xx_i2s;
+
+@@ -406,6 +410,38 @@
+ return 0;
+ }
+
++#ifdef CONFIG_PM
++int s3c24xx_i2s_suspend(struct platform_device *pdev,
++ struct snd_soc_cpu_dai *cpu_dai)
++{
++ s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
++ s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
++ s3c24xx_i2s.iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON);
++ s3c24xx_i2s.iispsr = readl(s3c24xx_i2s.regs + S3C2410_IISPSR);
++
++ clk_disable(s3c24xx_i2s.iis_clk);
++
++ return 0;
++}
++
++int s3c24xx_i2s_resume(struct platform_device *pdev,
++ struct snd_soc_cpu_dai *cpu_dai)
++{
++ clk_enable(s3c24xx_i2s.iis_clk);
++
++ writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON);
++ writel(s3c24xx_i2s.iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
++ writel(s3c24xx_i2s.iisfcon, s3c24xx_i2s.regs + S3C2410_IISFCON);
++ writel(s3c24xx_i2s.iispsr, s3c24xx_i2s.regs + S3C2410_IISPSR);
++
++ return 0;
++}
++#else
++#define s3c24xx_i2s_suspend NULL
++#define s3c24xx_i2s_resume NULL
++#endif
++
++
+ #define S3C24XX_I2S_RATES \
+ (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_16000 | \
+ SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
+@@ -416,6 +452,8 @@
+ .id = 0,
+ .type = SND_SOC_DAI_I2S,
+ .probe = s3c24xx_i2s_probe,
++ .suspend = s3c24xx_i2s_suspend,
++ .resume = s3c24xx_i2s_resume,
+ .playback = {
+ .channels_min = 2,
+ .channels_max = 2,
Modified: branches/src/target/kernel/2.6.24.x/patches/series
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/series 2008-01-21 21:13:30 UTC (rev 3905)
+++ branches/src/target/kernel/2.6.24.x/patches/series 2008-01-21 21:28:47 UTC (rev 3906)
@@ -72,6 +72,7 @@
# OE patches
fix-EVIOCGRAB-semantics.patch
+iis-suspend.patch
# Atheros WLAN driver
pnp_fixes.patch
More information about the commitlog
mailing list