summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-02-20 09:08:43 +0900
committerMark Brown <broonie@linaro.org>2014-03-19 13:10:01 +0000
commit657254714ad2ba69b73fcb02f0b1db378b1f220e (patch)
tree852e107b7f5259f3faec9c8d2d8ba79a72280dd7 /sound
parenta32c17b87c17f5e2e68edcf4d163ee42f9490652 (diff)
downloadlinux-657254714ad2ba69b73fcb02f0b1db378b1f220e.tar.gz
linux-657254714ad2ba69b73fcb02f0b1db378b1f220e.tar.bz2
linux-657254714ad2ba69b73fcb02f0b1db378b1f220e.zip
ASoC: io: Remove support for ASoC cache in conjunction with regmap
Since all regmap CODECs should be (and are) using the more advance regmap cache infrastructure remove the code which supports that and just proxy I/O straight through to regmap. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-io.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index 8aa086996866..260efc8466fc 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -23,21 +23,6 @@
static int hw_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
- int ret;
-
- if (!snd_soc_codec_volatile_register(codec, reg) &&
- reg < codec->driver->reg_cache_size &&
- !codec->cache_bypass) {
- ret = snd_soc_cache_write(codec, reg, value);
- if (ret < 0)
- return -1;
- }
-
- if (codec->cache_only) {
- codec->cache_sync = 1;
- return 0;
- }
-
return regmap_write(codec->control_data, reg, value);
}
@@ -46,23 +31,11 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
int ret;
unsigned int val;
- if (reg >= codec->driver->reg_cache_size ||
- snd_soc_codec_volatile_register(codec, reg) ||
- codec->cache_bypass) {
- if (codec->cache_only)
- return -1;
-
- ret = regmap_read(codec->control_data, reg, &val);
- if (ret == 0)
- return val;
- else
- return -1;
- }
-
- ret = snd_soc_cache_read(codec, reg, &val);
- if (ret < 0)
+ ret = regmap_read(codec->control_data, reg, &val);
+ if (ret == 0)
+ return val;
+ else
return -1;
- return val;
}
/**