aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/imx/imx-audmux.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-07 12:28:00 +0200
committerTakashi Iwai <tiwai@suse.de>2012-04-07 12:28:00 +0200
commitc38f62b08d800104fa9b0e9d6e9141459986c06d (patch)
tree1d04d768c8aa0c1a544d1f068317c7beb0101be2 /sound/soc/imx/imx-audmux.c
parentALSA: hda - clean up CX20549 test mixer setup (diff)
parentASoC: tegra: fix i2s compilation when !CONFIG_DEBUG_FS (diff)
downloadlinux-dev-c38f62b08d800104fa9b0e9d6e9141459986c06d.tar.xz
linux-dev-c38f62b08d800104fa9b0e9d6e9141459986c06d.zip
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: fixes for 3.4 A bunch of driver-specific fixes and one generic fix for the new support for platform DAPM contexts - we were picking the wrong default for the idle_bias_off setting which was meaning we weren't actually achieving any useful runtime PM on platform devices.
Diffstat (limited to 'sound/soc/imx/imx-audmux.c')
-rw-r--r--sound/soc/imx/imx-audmux.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/imx/imx-audmux.c b/sound/soc/imx/imx-audmux.c
index a839494c5ea8..0fe66c3dde12 100644
--- a/sound/soc/imx/imx-audmux.c
+++ b/sound/soc/imx/imx-audmux.c
@@ -79,14 +79,17 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
if (!buf)
return -ENOMEM;
+ if (!audmux_base)
+ return -ENOSYS;
+
if (audmux_clk)
- clk_enable(audmux_clk);
+ clk_prepare_enable(audmux_clk);
ptcr = readl(audmux_base + IMX_AUDMUX_V2_PTCR(port));
pdcr = readl(audmux_base + IMX_AUDMUX_V2_PDCR(port));
if (audmux_clk)
- clk_disable(audmux_clk);
+ clk_disable_unprepare(audmux_clk);
ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
pdcr, ptcr);
@@ -158,7 +161,7 @@ static void __init audmux_debugfs_init(void)
return;
}
- for (i = 1; i < 8; i++) {
+ for (i = 0; i < MX31_AUDMUX_PORT6_SSI_PINS_6 + 1; i++) {
snprintf(buf, sizeof(buf), "ssi%d", i);
if (!debugfs_create_file(buf, 0444, audmux_debugfs_root,
(void *)i, &audmux_debugfs_fops))
@@ -237,13 +240,13 @@ int imx_audmux_v2_configure_port(unsigned int port, unsigned int ptcr,
return -ENOSYS;
if (audmux_clk)
- clk_enable(audmux_clk);
+ clk_prepare_enable(audmux_clk);
writel(ptcr, audmux_base + IMX_AUDMUX_V2_PTCR(port));
writel(pdcr, audmux_base + IMX_AUDMUX_V2_PDCR(port));
if (audmux_clk)
- clk_disable(audmux_clk);
+ clk_disable_unprepare(audmux_clk);
return 0;
}