static int sun6i_i2s_suspend(struct snd_soc_dai *cpu_dai) { u32 reg_val; printk("[IIS]Entered %s\n", __func__); /*Global disable Digital Audio Interface*/ reg_val = readl(sun6i_iis.regs + SUN6I_IISCTL); reg_val &= ~SUN6I_IISCTL_GEN; writel(reg_val, sun6i_iis.regs + SUN6I_IISCTL); iisregsave(); if ((NULL == i2s_moduleclk) ||(IS_ERR(i2s_moduleclk))) { printk("i2s_moduleclk handle is invalid, just return\n"); return -EFAULT; } else { /*release the module clock*/ clk_disable(i2s_moduleclk); } if ((NULL == i2s_apbclk) ||(IS_ERR(i2s_apbclk))) { printk("i2s_apbclk handle is invalid, just return\n"); return -EFAULT; } else { clk_disable(i2s_apbclk); } return 0; }
static int sun7i_pcm_suspend(struct snd_soc_dai *cpu_dai) { u32 reg_val; printk("[IIS]Entered %s\n", __func__); //Global Enable Digital Audio Interface reg_val = readl(sun7i_pcm.regs + SUN7I_IISCTL); reg_val &= ~SUN7I_IISCTL_GEN; writel(reg_val, sun7i_pcm.regs + SUN7I_IISCTL); iisregsave(); if ((NULL == i2s_moduleclk) ||(IS_ERR(i2s_moduleclk))) { printk("i2s_moduleclk handle is invalid, just return\n"); return -EFAULT; } else { //release the module clock clk_disable(i2s_moduleclk); } if ((NULL == i2s_apbclk) ||(IS_ERR(i2s_apbclk))) { printk("i2s_apbclk handle is invalid, just return\n"); return -EFAULT; } else { clk_disable(i2s_apbclk); } //printk("[IIS]PLL2 0x01c20008 = %#x\n", *(volatile int*)0xF1C20008); /*printk("[IIS]SPECIAL CLK 0x01c20068 = %#x, line= %d\n", *(volatile int*)0xF1C20068, __LINE__); printk("[IIS]SPECIAL CLK 0x01c200B8 = %#x, line = %d\n", *(volatile int*)0xF1C200B8, __LINE__);*/ return 0; }
static int sun4i_i2s_suspend(struct snd_soc_dai *cpu_dai) { u32 reg_val; printk("[IIS]Entered %s\n", __func__); //Global Enable Digital Audio Interface reg_val = readl(sun4i_iis.regs + SUN4I_IISCTL); reg_val &= ~SUN4I_IISCTL_GEN; writel(reg_val, sun4i_iis.regs + SUN4I_IISCTL); iisregsave(); //release the module clock clk_disable(i2s_moduleclk); clk_disable(i2s_apbclk); return 0; }