aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/ad193x.c10
-rw-r--r--sound/soc/codecs/adau1373.c7
-rw-r--r--sound/soc/codecs/adav80x.c7
-rw-r--r--sound/soc/codecs/ak4535.c9
-rw-r--r--sound/soc/codecs/ak4641.c8
-rw-r--r--sound/soc/codecs/ak4642.c8
-rw-r--r--sound/soc/codecs/ak4671.c12
-rw-r--r--sound/soc/codecs/alc5623.c7
-rw-r--r--sound/soc/codecs/alc5632.c8
-rw-r--r--sound/soc/codecs/cs4270.c9
-rw-r--r--sound/soc/codecs/cs42l51.c6
-rw-r--r--sound/soc/codecs/cs42l52.c9
-rw-r--r--sound/soc/codecs/cs42l73.c11
-rw-r--r--sound/soc/codecs/da7210.c8
-rw-r--r--sound/soc/codecs/da7213.c8
-rw-r--r--sound/soc/codecs/da732x.c13
-rw-r--r--sound/soc/codecs/da9055.c8
-rw-r--r--sound/soc/codecs/isabelle.c16
-rw-r--r--sound/soc/codecs/lm49453.c17
-rw-r--r--sound/soc/codecs/max9768.c5
-rw-r--r--sound/soc/codecs/max98088.c6
-rw-r--r--sound/soc/codecs/max98090.c8
-rw-r--r--sound/soc/codecs/max98095.c6
-rw-r--r--sound/soc/codecs/max9850.c8
-rw-r--r--sound/soc/codecs/ml26124.c10
-rw-r--r--sound/soc/codecs/rt5631.c9
-rw-r--r--sound/soc/codecs/rt5640.c8
-rw-r--r--sound/soc/codecs/sn95031.c2
-rw-r--r--sound/soc/codecs/ssm2518.c10
-rw-r--r--sound/soc/codecs/ssm2602.c7
-rw-r--r--sound/soc/codecs/sta32x.c14
-rw-r--r--sound/soc/codecs/sta529.c10
-rw-r--r--sound/soc/codecs/tlv320aic23.c8
-rw-r--r--sound/soc/codecs/tlv320aic26.c2
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c2
-rw-r--r--sound/soc/codecs/tlv320aic3x.c6
-rw-r--r--sound/soc/codecs/wm2000.c2
-rw-r--r--sound/soc/codecs/wm2200.c7
-rw-r--r--sound/soc/codecs/wm5100.c7
-rw-r--r--sound/soc/codecs/wm8510.c10
-rw-r--r--sound/soc/codecs/wm8523.c7
-rw-r--r--sound/soc/codecs/wm8580.c6
-rw-r--r--sound/soc/codecs/wm8711.c6
-rw-r--r--sound/soc/codecs/wm8728.c11
-rw-r--r--sound/soc/codecs/wm8731.c7
-rw-r--r--sound/soc/codecs/wm8737.c6
-rw-r--r--sound/soc/codecs/wm8741.c6
-rw-r--r--sound/soc/codecs/wm8750.c6
-rw-r--r--sound/soc/codecs/wm8753.c7
-rw-r--r--sound/soc/codecs/wm8770.c6
-rw-r--r--sound/soc/codecs/wm8776.c6
-rw-r--r--sound/soc/codecs/wm8804.c8
-rw-r--r--sound/soc/codecs/wm8900.c8
-rw-r--r--sound/soc/codecs/wm8903.c10
-rw-r--r--sound/soc/codecs/wm8904.c9
-rw-r--r--sound/soc/codecs/wm8940.c6
-rw-r--r--sound/soc/codecs/wm8955.c8
-rw-r--r--sound/soc/codecs/wm8960.c6
-rw-r--r--sound/soc/codecs/wm8961.c7
-rw-r--r--sound/soc/codecs/wm8962.c7
-rw-r--r--sound/soc/codecs/wm8971.c6
-rw-r--r--sound/soc/codecs/wm8974.c6
-rw-r--r--sound/soc/codecs/wm8978.c8
-rw-r--r--sound/soc/codecs/wm8983.c6
-rw-r--r--sound/soc/codecs/wm8985.c7
-rw-r--r--sound/soc/codecs/wm8988.c8
-rw-r--r--sound/soc/codecs/wm8990.c8
-rw-r--r--sound/soc/codecs/wm8991.c8
-rw-r--r--sound/soc/codecs/wm8993.c7
-rw-r--r--sound/soc/codecs/wm8995.c7
-rw-r--r--sound/soc/codecs/wm8996.c12
-rw-r--r--sound/soc/codecs/wm9081.c11
-rw-r--r--sound/soc/codecs/wm9090.c10
73 files changed, 13 insertions, 562 deletions
diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c
index 9381a767e75f..6844d0b2af68 100644
--- a/sound/soc/codecs/ad193x.c
+++ b/sound/soc/codecs/ad193x.c
@@ -322,14 +322,6 @@ static struct snd_soc_dai_driver ad193x_dai = {
322static int ad193x_codec_probe(struct snd_soc_codec *codec) 322static int ad193x_codec_probe(struct snd_soc_codec *codec)
323{ 323{
324 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); 324 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec);
325 int ret;
326
327 codec->control_data = ad193x->regmap;
328 ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
329 if (ret < 0) {
330 dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
331 return ret;
332 }
333 325
334 /* default setting for ad193x */ 326 /* default setting for ad193x */
335 327
@@ -347,7 +339,7 @@ static int ad193x_codec_probe(struct snd_soc_codec *codec)
347 regmap_write(ad193x->regmap, AD193X_PLL_CLK_CTRL0, 0x99); /* mclk=24.576Mhz: 0x9D; mclk=12.288Mhz: 0x99 */ 339 regmap_write(ad193x->regmap, AD193X_PLL_CLK_CTRL0, 0x99); /* mclk=24.576Mhz: 0x9D; mclk=12.288Mhz: 0x99 */
348 regmap_write(ad193x->regmap, AD193X_PLL_CLK_CTRL1, 0x04); 340 regmap_write(ad193x->regmap, AD193X_PLL_CLK_CTRL1, 0x04);
349 341
350 return ret; 342 return 0;
351} 343}
352 344
353static struct snd_soc_codec_driver soc_codec_dev_ad193x = { 345static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
index eb836ed5271f..db5c303dcdbc 100644
--- a/sound/soc/codecs/adau1373.c
+++ b/sound/soc/codecs/adau1373.c
@@ -1376,15 +1376,8 @@ static int adau1373_probe(struct snd_soc_codec *codec)
1376 struct adau1373_platform_data *pdata = codec->dev->platform_data; 1376 struct adau1373_platform_data *pdata = codec->dev->platform_data;
1377 bool lineout_differential = false; 1377 bool lineout_differential = false;
1378 unsigned int val; 1378 unsigned int val;
1379 int ret;
1380 int i; 1379 int i;
1381 1380
1382 ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
1383 if (ret) {
1384 dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
1385 return ret;
1386 }
1387
1388 if (pdata) { 1381 if (pdata) {
1389 if (pdata->num_drc > ARRAY_SIZE(pdata->drc_setting)) 1382 if (pdata->num_drc > ARRAY_SIZE(pdata->drc_setting))
1390 return -EINVAL; 1383 return -EINVAL;
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index f78b27a7c461..8d79c3fe02dc 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -798,15 +798,8 @@ static struct snd_soc_dai_driver adav80x_dais[] = {
798 798
799static int adav80x_probe(struct snd_soc_codec *codec) 799static int adav80x_probe(struct snd_soc_codec *codec)
800{ 800{
801 int ret;
802 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); 801 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
803 802
804 ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
805 if (ret) {
806 dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
807 return ret;
808 }
809
810 /* Force PLLs on for SYSCLK output */ 803 /* Force PLLs on for SYSCLK output */
811 snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1"); 804 snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1");
812 snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2"); 805 snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2");
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index 684fe910669f..30e297890fec 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -388,15 +388,6 @@ static int ak4535_resume(struct snd_soc_codec *codec)
388 388
389static int ak4535_probe(struct snd_soc_codec *codec) 389static int ak4535_probe(struct snd_soc_codec *codec)
390{ 390{
391 struct ak4535_priv *ak4535 = snd_soc_codec_get_drvdata(codec);
392 int ret;
393
394 codec->control_data = ak4535->regmap;
395 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
396 if (ret < 0) {
397 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
398 return ret;
399 }
400 /* power on device */ 391 /* power on device */
401 ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 392 ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
402 393
diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
index 94cbe508dd37..a7b7d9858f8a 100644
--- a/sound/soc/codecs/ak4641.c
+++ b/sound/soc/codecs/ak4641.c
@@ -519,14 +519,6 @@ static int ak4641_resume(struct snd_soc_codec *codec)
519 519
520static int ak4641_probe(struct snd_soc_codec *codec) 520static int ak4641_probe(struct snd_soc_codec *codec)
521{ 521{
522 int ret;
523
524 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
525 if (ret != 0) {
526 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
527 return ret;
528 }
529
530 /* power on device */ 522 /* power on device */
531 ak4641_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 523 ak4641_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
532 524
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 1f646c6e90c6..92655cc189ae 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -465,14 +465,6 @@ static int ak4642_resume(struct snd_soc_codec *codec)
465 465
466static int ak4642_probe(struct snd_soc_codec *codec) 466static int ak4642_probe(struct snd_soc_codec *codec)
467{ 467{
468 int ret;
469
470 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
471 if (ret < 0) {
472 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
473 return ret;
474 }
475
476 ak4642_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 468 ak4642_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
477 469
478 return 0; 470 return 0;
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
index deb2b44669de..998fa0c5a0b9 100644
--- a/sound/soc/codecs/ak4671.c
+++ b/sound/soc/codecs/ak4671.c
@@ -613,17 +613,7 @@ static struct snd_soc_dai_driver ak4671_dai = {
613 613
614static int ak4671_probe(struct snd_soc_codec *codec) 614static int ak4671_probe(struct snd_soc_codec *codec)
615{ 615{
616 int ret; 616 return ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
617
618 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
619 if (ret < 0) {
620 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
621 return ret;
622 }
623
624 ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
625
626 return ret;
627} 617}
628 618
629static int ak4671_remove(struct snd_soc_codec *codec) 619static int ak4671_remove(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index ed506253a914..09f7e773bafb 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -904,13 +904,6 @@ static int alc5623_probe(struct snd_soc_codec *codec)
904 struct snd_soc_dapm_context *dapm = &codec->dapm; 904 struct snd_soc_dapm_context *dapm = &codec->dapm;
905 int ret; 905 int ret;
906 906
907 codec->control_data = alc5623->regmap;
908 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
909 if (ret < 0) {
910 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
911 return ret;
912 }
913
914 alc5623_reset(codec); 907 alc5623_reset(codec);
915 908
916 /* power on device */ 909 /* power on device */
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
index d885056ad8f2..ec071a6306ef 100644
--- a/sound/soc/codecs/alc5632.c
+++ b/sound/soc/codecs/alc5632.c
@@ -1063,14 +1063,6 @@ static int alc5632_probe(struct snd_soc_codec *codec)
1063 struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec); 1063 struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec);
1064 int ret; 1064 int ret;
1065 1065
1066 codec->control_data = alc5632->regmap;
1067
1068 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1069 if (ret != 0) {
1070 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1071 return ret;
1072 }
1073
1074 /* power on device */ 1066 /* power on device */
1075 alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1067 alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1076 1068
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 83c835d9fd88..3920e6264948 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -506,15 +506,6 @@ static int cs4270_probe(struct snd_soc_codec *codec)
506 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); 506 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
507 int ret; 507 int ret;
508 508
509 /* Tell ASoC what kind of I/O to use to read the registers. ASoC will
510 * then do the I2C transactions itself.
511 */
512 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
513 if (ret < 0) {
514 dev_err(codec->dev, "failed to set cache I/O (ret=%i)\n", ret);
515 return ret;
516 }
517
518 /* Disable auto-mute. This feature appears to be buggy. In some 509 /* Disable auto-mute. This feature appears to be buggy. In some
519 * situations, auto-mute will not deactivate when it should, so we want 510 * situations, auto-mute will not deactivate when it should, so we want
520 * this feature disabled by default. An application (e.g. alsactl) can 511 * this feature disabled by default. An application (e.g. alsactl) can
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 3eab46020a30..a0c6060df4b4 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -489,12 +489,6 @@ static int cs42l51_probe(struct snd_soc_codec *codec)
489{ 489{
490 int ret, reg; 490 int ret, reg;
491 491
492 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
493 if (ret < 0) {
494 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
495 return ret;
496 }
497
498 /* 492 /*
499 * DAC configuration 493 * DAC configuration
500 * - Use signal processor 494 * - Use signal processor
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 0bac6d5a4ac8..4bd59cea4922 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -1115,14 +1115,7 @@ static void cs42l52_free_beep(struct snd_soc_codec *codec)
1115static int cs42l52_probe(struct snd_soc_codec *codec) 1115static int cs42l52_probe(struct snd_soc_codec *codec)
1116{ 1116{
1117 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); 1117 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec);
1118 int ret;
1119 1118
1120 codec->control_data = cs42l52->regmap;
1121 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1122 if (ret < 0) {
1123 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1124 return ret;
1125 }
1126 regcache_cache_only(cs42l52->regmap, true); 1119 regcache_cache_only(cs42l52->regmap, true);
1127 1120
1128 cs42l52_add_mic_controls(codec); 1121 cs42l52_add_mic_controls(codec);
@@ -1134,7 +1127,7 @@ static int cs42l52_probe(struct snd_soc_codec *codec)
1134 cs42l52->sysclk = CS42L52_DEFAULT_CLK; 1127 cs42l52->sysclk = CS42L52_DEFAULT_CLK;
1135 cs42l52->config.format = CS42L52_DEFAULT_FORMAT; 1128 cs42l52->config.format = CS42L52_DEFAULT_FORMAT;
1136 1129
1137 return ret; 1130 return 0;
1138} 1131}
1139 1132
1140static int cs42l52_remove(struct snd_soc_codec *codec) 1133static int cs42l52_remove(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 549d5d6a3fef..b9aa009b5b01 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1348,17 +1348,8 @@ static int cs42l73_resume(struct snd_soc_codec *codec)
1348 1348
1349static int cs42l73_probe(struct snd_soc_codec *codec) 1349static int cs42l73_probe(struct snd_soc_codec *codec)
1350{ 1350{
1351 int ret;
1352 struct cs42l73_private *cs42l73 = snd_soc_codec_get_drvdata(codec); 1351 struct cs42l73_private *cs42l73 = snd_soc_codec_get_drvdata(codec);
1353 1352
1354 codec->control_data = cs42l73->regmap;
1355
1356 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1357 if (ret < 0) {
1358 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1359 return ret;
1360 }
1361
1362 cs42l73_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1353 cs42l73_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1363 1354
1364 /* Set Charge Pump Frequency */ 1355 /* Set Charge Pump Frequency */
@@ -1371,7 +1362,7 @@ static int cs42l73_probe(struct snd_soc_codec *codec)
1371 cs42l73->mclksel = CS42L73_CLKID_MCLK1; 1362 cs42l73->mclksel = CS42L73_CLKID_MCLK1;
1372 cs42l73->mclk = 0; 1363 cs42l73->mclk = 0;
1373 1364
1374 return ret; 1365 return 0;
1375} 1366}
1376 1367
1377static int cs42l73_remove(struct snd_soc_codec *codec) 1368static int cs42l73_remove(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index e62e294a8033..a5838ba69e4e 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -1071,17 +1071,9 @@ static struct snd_soc_dai_driver da7210_dai = {
1071static int da7210_probe(struct snd_soc_codec *codec) 1071static int da7210_probe(struct snd_soc_codec *codec)
1072{ 1072{
1073 struct da7210_priv *da7210 = snd_soc_codec_get_drvdata(codec); 1073 struct da7210_priv *da7210 = snd_soc_codec_get_drvdata(codec);
1074 int ret;
1075 1074
1076 dev_info(codec->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION); 1075 dev_info(codec->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION);
1077 1076
1078 codec->control_data = da7210->regmap;
1079 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1080 if (ret < 0) {
1081 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1082 return ret;
1083 }
1084
1085 da7210->mclk_rate = 0; /* This will be set from set_sysclk() */ 1077 da7210->mclk_rate = 0; /* This will be set from set_sysclk() */
1086 da7210->master = 0; /* This will be set from set_fmt() */ 1078 da7210->master = 0; /* This will be set from set_fmt() */
1087 1079
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index 0c77e7ad7423..110f4dd1a89e 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -1384,17 +1384,9 @@ static int da7213_set_bias_level(struct snd_soc_codec *codec,
1384 1384
1385static int da7213_probe(struct snd_soc_codec *codec) 1385static int da7213_probe(struct snd_soc_codec *codec)
1386{ 1386{
1387 int ret;
1388 struct da7213_priv *da7213 = snd_soc_codec_get_drvdata(codec); 1387 struct da7213_priv *da7213 = snd_soc_codec_get_drvdata(codec);
1389 struct da7213_platform_data *pdata = da7213->pdata; 1388 struct da7213_platform_data *pdata = da7213->pdata;
1390 1389
1391 codec->control_data = da7213->regmap;
1392 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1393 if (ret < 0) {
1394 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1395 return ret;
1396 }
1397
1398 /* Default to using ALC auto offset calibration mode. */ 1390 /* Default to using ALC auto offset calibration mode. */
1399 snd_soc_update_bits(codec, DA7213_ALC_CTRL1, 1391 snd_soc_update_bits(codec, DA7213_ALC_CTRL1,
1400 DA7213_ALC_CALIB_MODE_MAN, 0); 1392 DA7213_ALC_CALIB_MODE_MAN, 0);
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index 8053e0e7f4a7..fdefc4bb8bc4 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -1516,23 +1516,14 @@ static int da732x_probe(struct snd_soc_codec *codec)
1516{ 1516{
1517 struct da732x_priv *da732x = snd_soc_codec_get_drvdata(codec); 1517 struct da732x_priv *da732x = snd_soc_codec_get_drvdata(codec);
1518 struct snd_soc_dapm_context *dapm = &codec->dapm; 1518 struct snd_soc_dapm_context *dapm = &codec->dapm;
1519 int ret = 0;
1520 1519
1521 da732x->codec = codec; 1520 da732x->codec = codec;
1522 1521
1523 dapm->idle_bias_off = false; 1522 dapm->idle_bias_off = false;
1524 1523
1525 codec->control_data = da732x->regmap;
1526
1527 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1528 if (ret != 0) {
1529 dev_err(codec->dev, "Failed to register codec.\n");
1530 goto err;
1531 }
1532
1533 da732x_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1524 da732x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1534err: 1525
1535 return ret; 1526 return 0;
1536} 1527}
1537 1528
1538static int da732x_remove(struct snd_soc_codec *codec) 1529static int da732x_remove(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index 52b79a487ac7..f0a371dbaee3 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -1381,16 +1381,8 @@ static int da9055_set_bias_level(struct snd_soc_codec *codec,
1381 1381
1382static int da9055_probe(struct snd_soc_codec *codec) 1382static int da9055_probe(struct snd_soc_codec *codec)
1383{ 1383{
1384 int ret;
1385 struct da9055_priv *da9055 = snd_soc_codec_get_drvdata(codec); 1384 struct da9055_priv *da9055 = snd_soc_codec_get_drvdata(codec);
1386 1385
1387 codec->control_data = da9055->regmap;
1388 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1389 if (ret < 0) {
1390 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1391 return ret;
1392 }
1393
1394 /* Enable all Gain Ramps */ 1386 /* Enable all Gain Ramps */
1395 snd_soc_update_bits(codec, DA9055_AUX_L_CTRL, 1387 snd_soc_update_bits(codec, DA9055_AUX_L_CTRL,
1396 DA9055_GAIN_RAMPING_EN, DA9055_GAIN_RAMPING_EN); 1388 DA9055_GAIN_RAMPING_EN, DA9055_GAIN_RAMPING_EN);
diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c
index 5839048ec467..087b3cb2dcdf 100644
--- a/sound/soc/codecs/isabelle.c
+++ b/sound/soc/codecs/isabelle.c
@@ -1082,23 +1082,7 @@ static struct snd_soc_dai_driver isabelle_dai[] = {
1082 }, 1082 },
1083}; 1083};
1084 1084
1085static int isabelle_probe(struct snd_soc_codec *codec)
1086{
1087 int ret = 0;
1088
1089 codec->control_data = dev_get_regmap(codec->dev, NULL);
1090
1091 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1092 if (ret < 0) {
1093 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1094 return ret;
1095 }
1096
1097 return 0;
1098}
1099
1100static struct snd_soc_codec_driver soc_codec_dev_isabelle = { 1085static struct snd_soc_codec_driver soc_codec_dev_isabelle = {
1101 .probe = isabelle_probe,
1102 .set_bias_level = isabelle_set_bias_level, 1086 .set_bias_level = isabelle_set_bias_level,
1103 .controls = isabelle_snd_controls, 1087 .controls = isabelle_snd_controls,
1104 .num_controls = ARRAY_SIZE(isabelle_snd_controls), 1088 .num_controls = ARRAY_SIZE(isabelle_snd_controls),
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index e19490cfb3a8..069cb0359932 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -1409,22 +1409,6 @@ static int lm49453_resume(struct snd_soc_codec *codec)
1409 return 0; 1409 return 0;
1410} 1410}
1411 1411
1412static int lm49453_probe(struct snd_soc_codec *codec)
1413{
1414 struct lm49453_priv *lm49453 = snd_soc_codec_get_drvdata(codec);
1415 int ret = 0;
1416
1417 codec->control_data = lm49453->regmap;
1418
1419 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1420 if (ret < 0) {
1421 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1422 return ret;
1423 }
1424
1425 return 0;
1426}
1427
1428/* power down chip */ 1412/* power down chip */
1429static int lm49453_remove(struct snd_soc_codec *codec) 1413static int lm49453_remove(struct snd_soc_codec *codec)
1430{ 1414{
@@ -1433,7 +1417,6 @@ static int lm49453_remove(struct snd_soc_codec *codec)
1433} 1417}
1434 1418
1435static struct snd_soc_codec_driver soc_codec_dev_lm49453 = { 1419static struct snd_soc_codec_driver soc_codec_dev_lm49453 = {
1436 .probe = lm49453_probe,
1437 .remove = lm49453_remove, 1420 .remove = lm49453_remove,
1438 .suspend = lm49453_suspend, 1421 .suspend = lm49453_suspend,
1439 .resume = lm49453_resume, 1422 .resume = lm49453_resume,
diff --git a/sound/soc/codecs/max9768.c b/sound/soc/codecs/max9768.c
index 31f91560e9f6..ec481fc428c7 100644
--- a/sound/soc/codecs/max9768.c
+++ b/sound/soc/codecs/max9768.c
@@ -135,11 +135,6 @@ static int max9768_probe(struct snd_soc_codec *codec)
135 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec); 135 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec);
136 int ret; 136 int ret;
137 137
138 codec->control_data = max9768->regmap;
139 ret = snd_soc_codec_set_cache_io(codec, 2, 6, SND_SOC_REGMAP);
140 if (ret)
141 return ret;
142
143 if (max9768->flags & MAX9768_FLAG_CLASSIC_PWM) { 138 if (max9768->flags & MAX9768_FLAG_CLASSIC_PWM) {
144 ret = snd_soc_write(codec, MAX9768_CTRL, MAX9768_CTRL_PWM); 139 ret = snd_soc_write(codec, MAX9768_CTRL, MAX9768_CTRL_PWM);
145 if (ret) 140 if (ret)
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index ee660e2d3df3..64965005a41e 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1915,12 +1915,6 @@ static int max98088_probe(struct snd_soc_codec *codec)
1915 1915
1916 regcache_mark_dirty(max98088->regmap); 1916 regcache_mark_dirty(max98088->regmap);
1917 1917
1918 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1919 if (ret != 0) {
1920 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1921 return ret;
1922 }
1923
1924 /* initialize private data */ 1918 /* initialize private data */
1925 1919
1926 max98088->sysclk = (unsigned)-1; 1920 max98088->sysclk = (unsigned)-1;
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 51f9b3d16b41..4ac3b67b2006 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2195,14 +2195,6 @@ static int max98090_probe(struct snd_soc_codec *codec)
2195 2195
2196 max98090->codec = codec; 2196 max98090->codec = codec;
2197 2197
2198 codec->control_data = max98090->regmap;
2199
2200 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
2201 if (ret != 0) {
2202 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
2203 return ret;
2204 }
2205
2206 /* Reset the codec, the DSP core, and disable all interrupts */ 2198 /* Reset the codec, the DSP core, and disable all interrupts */
2207 max98090_reset(max98090); 2199 max98090_reset(max98090);
2208 2200
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 3ba1170ebb53..2a9bfefb7d26 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -2234,12 +2234,6 @@ static int max98095_probe(struct snd_soc_codec *codec)
2234 struct i2c_client *client; 2234 struct i2c_client *client;
2235 int ret = 0; 2235 int ret = 0;
2236 2236
2237 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
2238 if (ret != 0) {
2239 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
2240 return ret;
2241 }
2242
2243 /* reset the codec, the DSP core, and disable all interrupts */ 2237 /* reset the codec, the DSP core, and disable all interrupts */
2244 max98095_reset(codec); 2238 max98095_reset(codec);
2245 2239
diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c
index 82757ebf0301..4fdf5aaa236f 100644
--- a/sound/soc/codecs/max9850.c
+++ b/sound/soc/codecs/max9850.c
@@ -312,14 +312,6 @@ static int max9850_resume(struct snd_soc_codec *codec)
312 312
313static int max9850_probe(struct snd_soc_codec *codec) 313static int max9850_probe(struct snd_soc_codec *codec)
314{ 314{
315 int ret;
316
317 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
318 if (ret < 0) {
319 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
320 return ret;
321 }
322
323 /* enable zero-detect */ 315 /* enable zero-detect */
324 snd_soc_update_bits(codec, MAX9850_GENERAL_PURPOSE, 1, 1); 316 snd_soc_update_bits(codec, MAX9850_GENERAL_PURPOSE, 1, 1);
325 /* enable slew-rate control */ 317 /* enable slew-rate control */
diff --git a/sound/soc/codecs/ml26124.c b/sound/soc/codecs/ml26124.c
index 185fa3bc3052..b9f21fe5a7dc 100644
--- a/sound/soc/codecs/ml26124.c
+++ b/sound/soc/codecs/ml26124.c
@@ -586,16 +586,6 @@ static int ml26124_resume(struct snd_soc_codec *codec)
586 586
587static int ml26124_probe(struct snd_soc_codec *codec) 587static int ml26124_probe(struct snd_soc_codec *codec)
588{ 588{
589 int ret;
590 struct ml26124_priv *priv = snd_soc_codec_get_drvdata(codec);
591 codec->control_data = priv->regmap;
592
593 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
594 if (ret < 0) {
595 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
596 return ret;
597 }
598
599 /* Software Reset */ 589 /* Software Reset */
600 snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 1); 590 snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 1);
601 snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 0); 591 snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 0);
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 912c9cbc2724..73fcd3cff327 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1585,15 +1585,6 @@ static int rt5631_probe(struct snd_soc_codec *codec)
1585{ 1585{
1586 struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec); 1586 struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec);
1587 unsigned int val; 1587 unsigned int val;
1588 int ret;
1589
1590 codec->control_data = rt5631->regmap;
1591
1592 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1593 if (ret != 0) {
1594 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1595 return ret;
1596 }
1597 1588
1598 val = rt5631_read_index(codec, RT5631_ADDA_MIXER_INTL_REG3); 1589 val = rt5631_read_index(codec, RT5631_ADDA_MIXER_INTL_REG3);
1599 if (val & 0x0002) 1590 if (val & 0x0002)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index a3fb41179636..074cff100f54 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -1943,16 +1943,8 @@ static int rt5640_set_bias_level(struct snd_soc_codec *codec,
1943static int rt5640_probe(struct snd_soc_codec *codec) 1943static int rt5640_probe(struct snd_soc_codec *codec)
1944{ 1944{
1945 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); 1945 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec);
1946 int ret;
1947 1946
1948 rt5640->codec = codec; 1947 rt5640->codec = codec;
1949 codec->control_data = rt5640->regmap;
1950
1951 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1952 if (ret != 0) {
1953 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1954 return ret;
1955 }
1956 1948
1957 codec->dapm.idle_bias_off = 1; 1949 codec->dapm.idle_bias_off = 1;
1958 rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF); 1950 rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF);
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index 13045f2af4d3..193760ec98ef 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -825,8 +825,6 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
825{ 825{
826 pr_debug("codec_probe called\n"); 826 pr_debug("codec_probe called\n");
827 827
828 snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
829
830 /* PCM interface config 828 /* PCM interface config
831 * This sets the pcm rx slot conguration to max 6 slots 829 * This sets the pcm rx slot conguration to max 6 slots
832 * for max 4 dais (2 stereo and 2 mono) 830 * for max 4 dais (2 stereo and 2 mono)
diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
index cc8debce752f..cf4a6572f35b 100644
--- a/sound/soc/codecs/ssm2518.c
+++ b/sound/soc/codecs/ssm2518.c
@@ -648,16 +648,6 @@ static struct snd_soc_dai_driver ssm2518_dai = {
648 648
649static int ssm2518_probe(struct snd_soc_codec *codec) 649static int ssm2518_probe(struct snd_soc_codec *codec)
650{ 650{
651 struct ssm2518 *ssm2518 = snd_soc_codec_get_drvdata(codec);
652 int ret;
653
654 codec->control_data = ssm2518->regmap;
655 ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
656 if (ret < 0) {
657 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
658 return ret;
659 }
660
661 return ssm2518_set_bias_level(codec, SND_SOC_BIAS_OFF); 651 return ssm2518_set_bias_level(codec, SND_SOC_BIAS_OFF);
662} 652}
663 653
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index af76bbd1b24f..9fe4d485e699 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -573,13 +573,6 @@ static int ssm260x_probe(struct snd_soc_codec *codec)
573 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); 573 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
574 int ret; 574 int ret;
575 575
576 codec->control_data = ssm2602->regmap;
577 ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
578 if (ret < 0) {
579 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
580 return ret;
581 }
582
583 ret = regmap_write(ssm2602->regmap, SSM2602_RESET, 0); 576 ret = regmap_write(ssm2602->regmap, SSM2602_RESET, 0);
584 if (ret < 0) { 577 if (ret < 0) {
585 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); 578 dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 06edb396e733..1cab6f62be7c 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -872,16 +872,6 @@ static int sta32x_probe(struct snd_soc_codec *codec)
872 return ret; 872 return ret;
873 } 873 }
874 874
875 /* Tell ASoC what kind of I/O to use to read the registers. ASoC will
876 * then do the I2C transactions itself.
877 */
878 codec->control_data = sta32x->regmap;
879 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
880 if (ret < 0) {
881 dev_err(codec->dev, "failed to set cache I/O (ret=%i)\n", ret);
882 goto err;
883 }
884
885 /* Chip documentation explicitly requires that the reset values 875 /* Chip documentation explicitly requires that the reset values
886 * of reserved register bits are left untouched. 876 * of reserved register bits are left untouched.
887 * Write the register default value to cache for reserved registers, 877 * Write the register default value to cache for reserved registers,
@@ -946,10 +936,6 @@ static int sta32x_probe(struct snd_soc_codec *codec)
946 regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies); 936 regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies);
947 937
948 return 0; 938 return 0;
949
950err:
951 regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies);
952 return ret;
953} 939}
954 940
955static int sta32x_remove(struct snd_soc_codec *codec) 941static int sta32x_remove(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c
index 40c07be9b581..30aae61bfdb3 100644
--- a/sound/soc/codecs/sta529.c
+++ b/sound/soc/codecs/sta529.c
@@ -322,16 +322,6 @@ static struct snd_soc_dai_driver sta529_dai = {
322 322
323static int sta529_probe(struct snd_soc_codec *codec) 323static int sta529_probe(struct snd_soc_codec *codec)
324{ 324{
325 struct sta529 *sta529 = snd_soc_codec_get_drvdata(codec);
326 int ret;
327
328 codec->control_data = sta529->regmap;
329 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
330
331 if (ret < 0) {
332 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
333 return ret;
334 }
335 sta529_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 325 sta529_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
336 326
337 return 0; 327 return 0;
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 7b4cfef232ea..46b8a5073857 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -559,14 +559,6 @@ static int tlv320aic23_resume(struct snd_soc_codec *codec)
559 559
560static int tlv320aic23_codec_probe(struct snd_soc_codec *codec) 560static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)
561{ 561{
562 int ret;
563
564 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
565 if (ret < 0) {
566 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
567 return ret;
568 }
569
570 /* Reset codec */ 562 /* Reset codec */
571 snd_soc_write(codec, TLV320AIC23_RESET, 0); 563 snd_soc_write(codec, TLV320AIC23_RESET, 0);
572 564
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 94a658fa6d97..8037beabd030 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -295,8 +295,6 @@ static int aic26_probe(struct snd_soc_codec *codec)
295 struct aic26 *aic26 = dev_get_drvdata(codec->dev); 295 struct aic26 *aic26 = dev_get_drvdata(codec->dev);
296 int ret, reg; 296 int ret, reg;
297 297
298 snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
299
300 aic26->codec = codec; 298 aic26->codec = codec;
301 299
302 /* Reset the codec to power on defaults */ 300 /* Reset the codec to power on defaults */
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index c6bd7e75352d..1d9b117345a3 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -614,8 +614,6 @@ static int aic32x4_probe(struct snd_soc_codec *codec)
614 struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec); 614 struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec);
615 u32 tmp_reg; 615 u32 tmp_reg;
616 616
617 snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
618
619 if (gpio_is_valid(aic32x4->rstn_gpio)) { 617 if (gpio_is_valid(aic32x4->rstn_gpio)) {
620 ndelay(10); 618 ndelay(10);
621 gpio_set_value(aic32x4->rstn_gpio, 1); 619 gpio_set_value(aic32x4->rstn_gpio, 1);
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 470fbfb4b386..b1835103e9b4 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1344,12 +1344,6 @@ static int aic3x_probe(struct snd_soc_codec *codec)
1344 INIT_LIST_HEAD(&aic3x->list); 1344 INIT_LIST_HEAD(&aic3x->list);
1345 aic3x->codec = codec; 1345 aic3x->codec = codec;
1346 1346
1347 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1348 if (ret != 0) {
1349 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1350 return ret;
1351 }
1352
1353 for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++) { 1347 for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++) {
1354 aic3x->disable_nb[i].nb.notifier_call = aic3x_regulator_event; 1348 aic3x->disable_nb[i].nb.notifier_call = aic3x_regulator_event;
1355 aic3x->disable_nb[i].aic3x = aic3x; 1349 aic3x->disable_nb[i].aic3x = aic3x;
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 8ae50274ea8f..83a2c872925c 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -786,8 +786,6 @@ static int wm2000_probe(struct snd_soc_codec *codec)
786{ 786{
787 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); 787 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
788 788
789 snd_soc_codec_set_cache_io(codec, 16, 8, SND_SOC_REGMAP);
790
791 /* This will trigger a transition to standby mode by default */ 789 /* This will trigger a transition to standby mode by default */
792 wm2000_anc_set_mode(wm2000); 790 wm2000_anc_set_mode(wm2000);
793 791
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index 57ba315d0c84..5129d91a6da4 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -1556,15 +1556,8 @@ static int wm2200_probe(struct snd_soc_codec *codec)
1556 int ret; 1556 int ret;
1557 1557
1558 wm2200->codec = codec; 1558 wm2200->codec = codec;
1559 codec->control_data = wm2200->regmap;
1560 codec->dapm.bias_level = SND_SOC_BIAS_OFF; 1559 codec->dapm.bias_level = SND_SOC_BIAS_OFF;
1561 1560
1562 ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
1563 if (ret != 0) {
1564 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1565 return ret;
1566 }
1567
1568 ret = snd_soc_add_codec_controls(codec, wm_adsp1_fw_controls, 2); 1561 ret = snd_soc_add_codec_controls(codec, wm_adsp1_fw_controls, 2);
1569 if (ret != 0) 1562 if (ret != 0)
1570 return ret; 1563 return ret;
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 4e3e31aaf509..bac848f009e7 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2337,13 +2337,6 @@ static int wm5100_probe(struct snd_soc_codec *codec)
2337 int ret, i; 2337 int ret, i;
2338 2338
2339 wm5100->codec = codec; 2339 wm5100->codec = codec;
2340 codec->control_data = wm5100->regmap;
2341
2342 ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
2343 if (ret != 0) {
2344 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
2345 return ret;
2346 }
2347 2340
2348 for (i = 0; i < ARRAY_SIZE(wm5100_dig_vu); i++) 2341 for (i = 0; i < ARRAY_SIZE(wm5100_dig_vu); i++)
2349 snd_soc_update_bits(codec, wm5100_dig_vu[i], WM5100_OUT_VU, 2342 snd_soc_update_bits(codec, wm5100_dig_vu[i], WM5100_OUT_VU,
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 7df7d4572755..1c1e328feeb8 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -589,20 +589,12 @@ static int wm8510_resume(struct snd_soc_codec *codec)
589 589
590static int wm8510_probe(struct snd_soc_codec *codec) 590static int wm8510_probe(struct snd_soc_codec *codec)
591{ 591{
592 int ret;
593
594 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
595 if (ret < 0) {
596 printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", ret);
597 return ret;
598 }
599
600 wm8510_reset(codec); 592 wm8510_reset(codec);
601 593
602 /* power on device */ 594 /* power on device */
603 wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 595 wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
604 596
605 return ret; 597 return 0;
606} 598}
607 599
608/* power down chip */ 600/* power down chip */
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index 74d106dc7667..e6116aff0943 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -392,18 +392,11 @@ static int wm8523_resume(struct snd_soc_codec *codec)
392static int wm8523_probe(struct snd_soc_codec *codec) 392static int wm8523_probe(struct snd_soc_codec *codec)
393{ 393{
394 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec); 394 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
395 int ret;
396 395
397 wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0]; 396 wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0];
398 wm8523->rate_constraint.count = 397 wm8523->rate_constraint.count =
399 ARRAY_SIZE(wm8523->rate_constraint_list); 398 ARRAY_SIZE(wm8523->rate_constraint_list);
400 399
401 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
402 if (ret != 0) {
403 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
404 return ret;
405 }
406
407 /* Change some default settings - latch VU and enable ZC */ 400 /* Change some default settings - latch VU and enable ZC */
408 snd_soc_update_bits(codec, WM8523_DAC_GAINR, 401 snd_soc_update_bits(codec, WM8523_DAC_GAINR,
409 WM8523_DACR_VU, WM8523_DACR_VU); 402 WM8523_DACR_VU, WM8523_DACR_VU);
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 318989acbbe5..7558c838193d 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -869,12 +869,6 @@ static int wm8580_probe(struct snd_soc_codec *codec)
869 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); 869 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
870 int ret = 0; 870 int ret = 0;
871 871
872 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
873 if (ret < 0) {
874 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
875 return ret;
876 }
877
878 ret = regulator_bulk_enable(ARRAY_SIZE(wm8580->supplies), 872 ret = regulator_bulk_enable(ARRAY_SIZE(wm8580->supplies),
879 wm8580->supplies); 873 wm8580->supplies);
880 if (ret != 0) { 874 if (ret != 0) {
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index d99f948c513c..ef6cbc7ba489 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -367,12 +367,6 @@ static int wm8711_probe(struct snd_soc_codec *codec)
367{ 367{
368 int ret; 368 int ret;
369 369
370 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
371 if (ret < 0) {
372 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
373 return ret;
374 }
375
376 ret = wm8711_reset(codec); 370 ret = wm8711_reset(codec);
377 if (ret < 0) { 371 if (ret < 0) {
378 dev_err(codec->dev, "Failed to issue reset\n"); 372 dev_err(codec->dev, "Failed to issue reset\n");
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index cd89033e84c0..bac7fc28fe71 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -228,19 +228,10 @@ static int wm8728_resume(struct snd_soc_codec *codec)
228 228
229static int wm8728_probe(struct snd_soc_codec *codec) 229static int wm8728_probe(struct snd_soc_codec *codec)
230{ 230{
231 int ret;
232
233 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
234 if (ret < 0) {
235 printk(KERN_ERR "wm8728: failed to configure cache I/O: %d\n",
236 ret);
237 return ret;
238 }
239
240 /* power on device */ 231 /* power on device */
241 wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 232 wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
242 233
243 return ret; 234 return 0;
244} 235}
245 236
246static int wm8728_remove(struct snd_soc_codec *codec) 237static int wm8728_remove(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 029720366ff8..2c95b633e7df 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -583,13 +583,6 @@ static int wm8731_probe(struct snd_soc_codec *codec)
583 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); 583 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
584 int ret = 0, i; 584 int ret = 0, i;
585 585
586 codec->control_data = wm8731->regmap;
587 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
588 if (ret < 0) {
589 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
590 return ret;
591 }
592
593 for (i = 0; i < ARRAY_SIZE(wm8731->supplies); i++) 586 for (i = 0; i < ARRAY_SIZE(wm8731->supplies); i++)
594 wm8731->supplies[i].supply = wm8731_supply_names[i]; 587 wm8731->supplies[i].supply = wm8731_supply_names[i];
595 588
diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c
index 2f167a8ca01b..3693479b43d5 100644
--- a/sound/soc/codecs/wm8737.c
+++ b/sound/soc/codecs/wm8737.c
@@ -570,12 +570,6 @@ static int wm8737_probe(struct snd_soc_codec *codec)
570 struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec); 570 struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec);
571 int ret; 571 int ret;
572 572
573 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
574 if (ret != 0) {
575 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
576 return ret;
577 }
578
579 ret = regulator_bulk_enable(ARRAY_SIZE(wm8737->supplies), 573 ret = regulator_bulk_enable(ARRAY_SIZE(wm8737->supplies),
580 wm8737->supplies); 574 wm8737->supplies);
581 if (ret != 0) { 575 if (ret != 0) {
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 2895c8d3b5e4..ecf4fcfa99fd 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -429,12 +429,6 @@ static int wm8741_probe(struct snd_soc_codec *codec)
429 goto err_get; 429 goto err_get;
430 } 430 }
431 431
432 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
433 if (ret != 0) {
434 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
435 goto err_enable;
436 }
437
438 ret = wm8741_reset(codec); 432 ret = wm8741_reset(codec);
439 if (ret < 0) { 433 if (ret < 0) {
440 dev_err(codec->dev, "Failed to issue reset\n"); 434 dev_err(codec->dev, "Failed to issue reset\n");
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 78616a638a55..33990b63d214 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -702,12 +702,6 @@ static int wm8750_probe(struct snd_soc_codec *codec)
702{ 702{
703 int ret; 703 int ret;
704 704
705 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
706 if (ret < 0) {
707 printk(KERN_ERR "wm8750: failed to set cache I/O: %d\n", ret);
708 return ret;
709 }
710
711 ret = wm8750_reset(codec); 705 ret = wm8750_reset(codec);
712 if (ret < 0) { 706 if (ret < 0) {
713 printk(KERN_ERR "wm8750: failed to reset: %d\n", ret); 707 printk(KERN_ERR "wm8750: failed to reset: %d\n", ret);
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index be85da93a268..0d1670b70702 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1471,13 +1471,6 @@ static int wm8753_probe(struct snd_soc_codec *codec)
1471 1471
1472 INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8753_work); 1472 INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8753_work);
1473 1473
1474 codec->control_data = wm8753->regmap;
1475 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
1476 if (ret < 0) {
1477 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1478 return ret;
1479 }
1480
1481 ret = wm8753_reset(codec); 1474 ret = wm8753_reset(codec);
1482 if (ret < 0) { 1475 if (ret < 0) {
1483 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); 1476 dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c
index 89a18d82f303..32e736320526 100644
--- a/sound/soc/codecs/wm8770.c
+++ b/sound/soc/codecs/wm8770.c
@@ -580,12 +580,6 @@ static int wm8770_probe(struct snd_soc_codec *codec)
580 wm8770 = snd_soc_codec_get_drvdata(codec); 580 wm8770 = snd_soc_codec_get_drvdata(codec);
581 wm8770->codec = codec; 581 wm8770->codec = codec;
582 582
583 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
584 if (ret < 0) {
585 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
586 return ret;
587 }
588
589 ret = regulator_bulk_enable(ARRAY_SIZE(wm8770->supplies), 583 ret = regulator_bulk_enable(ARRAY_SIZE(wm8770->supplies),
590 wm8770->supplies); 584 wm8770->supplies);
591 if (ret) { 585 if (ret) {
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c
index ef8246725232..70952ceb278b 100644
--- a/sound/soc/codecs/wm8776.c
+++ b/sound/soc/codecs/wm8776.c
@@ -430,12 +430,6 @@ static int wm8776_probe(struct snd_soc_codec *codec)
430{ 430{
431 int ret = 0; 431 int ret = 0;
432 432
433 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
434 if (ret < 0) {
435 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
436 return ret;
437 }
438
439 ret = wm8776_reset(codec); 433 ret = wm8776_reset(codec);
440 if (ret < 0) { 434 if (ret < 0) {
441 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); 435 dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c
index 9bc8206a6807..448a943e5a1b 100644
--- a/sound/soc/codecs/wm8804.c
+++ b/sound/soc/codecs/wm8804.c
@@ -546,14 +546,6 @@ static int wm8804_probe(struct snd_soc_codec *codec)
546 546
547 wm8804 = snd_soc_codec_get_drvdata(codec); 547 wm8804 = snd_soc_codec_get_drvdata(codec);
548 548
549 codec->control_data = wm8804->regmap;
550
551 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
552 if (ret < 0) {
553 dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
554 return ret;
555 }
556
557 for (i = 0; i < ARRAY_SIZE(wm8804->supplies); i++) 549 for (i = 0; i < ARRAY_SIZE(wm8804->supplies); i++)
558 wm8804->supplies[i].supply = wm8804_supply_names[i]; 550 wm8804->supplies[i].supply = wm8804_supply_names[i];
559 551
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index e98bc7038a08..637be63cd474 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -1178,13 +1178,7 @@ static int wm8900_resume(struct snd_soc_codec *codec)
1178 1178
1179static int wm8900_probe(struct snd_soc_codec *codec) 1179static int wm8900_probe(struct snd_soc_codec *codec)
1180{ 1180{
1181 int ret = 0, reg; 1181 int reg;
1182
1183 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1184 if (ret != 0) {
1185 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1186 return ret;
1187 }
1188 1182
1189 reg = snd_soc_read(codec, WM8900_REG_ID); 1183 reg = snd_soc_read(codec, WM8900_REG_ID);
1190 if (reg != 0x8900) { 1184 if (reg != 0x8900) {
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index eebcb1da3b7b..cf2f49fdb3bd 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1897,21 +1897,13 @@ static void wm8903_free_gpio(struct wm8903_priv *wm8903)
1897static int wm8903_probe(struct snd_soc_codec *codec) 1897static int wm8903_probe(struct snd_soc_codec *codec)
1898{ 1898{
1899 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); 1899 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
1900 int ret;
1901 1900
1902 wm8903->codec = codec; 1901 wm8903->codec = codec;
1903 codec->control_data = wm8903->regmap;
1904
1905 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1906 if (ret != 0) {
1907 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1908 return ret;
1909 }
1910 1902
1911 /* power on device */ 1903 /* power on device */
1912 wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1904 wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1913 1905
1914 return ret; 1906 return 0;
1915} 1907}
1916 1908
1917/* power down chip */ 1909/* power down chip */
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 53bbfac6a83a..817dddc7f8a1 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -2047,9 +2047,6 @@ static void wm8904_handle_pdata(struct snd_soc_codec *codec)
2047static int wm8904_probe(struct snd_soc_codec *codec) 2047static int wm8904_probe(struct snd_soc_codec *codec)
2048{ 2048{
2049 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 2049 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
2050 int ret;
2051
2052 codec->control_data = wm8904->regmap;
2053 2050
2054 switch (wm8904->devtype) { 2051 switch (wm8904->devtype) {
2055 case WM8904: 2052 case WM8904:
@@ -2063,12 +2060,6 @@ static int wm8904_probe(struct snd_soc_codec *codec)
2063 return -EINVAL; 2060 return -EINVAL;
2064 } 2061 }
2065 2062
2066 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
2067 if (ret != 0) {
2068 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
2069 return ret;
2070 }
2071
2072 wm8904_handle_pdata(codec); 2063 wm8904_handle_pdata(codec);
2073 2064
2074 wm8904_add_widgets(codec); 2065 wm8904_add_widgets(codec);
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index b404c26c1753..1cdabaf07639 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -712,12 +712,6 @@ static int wm8940_probe(struct snd_soc_codec *codec)
712 int ret; 712 int ret;
713 u16 reg; 713 u16 reg;
714 714
715 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
716 if (ret < 0) {
717 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
718 return ret;
719 }
720
721 ret = wm8940_reset(codec); 715 ret = wm8940_reset(codec);
722 if (ret < 0) { 716 if (ret < 0) {
723 dev_err(codec->dev, "Failed to issue reset\n"); 717 dev_err(codec->dev, "Failed to issue reset\n");
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
index 82c8ba975720..a94d1858930a 100644
--- a/sound/soc/codecs/wm8955.c
+++ b/sound/soc/codecs/wm8955.c
@@ -896,14 +896,6 @@ static int wm8955_probe(struct snd_soc_codec *codec)
896 struct wm8955_pdata *pdata = dev_get_platdata(codec->dev); 896 struct wm8955_pdata *pdata = dev_get_platdata(codec->dev);
897 int ret, i; 897 int ret, i;
898 898
899 codec->control_data = wm8955->regmap;
900
901 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
902 if (ret != 0) {
903 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
904 return ret;
905 }
906
907 for (i = 0; i < ARRAY_SIZE(wm8955->supplies); i++) 899 for (i = 0; i < ARRAY_SIZE(wm8955->supplies); i++)
908 wm8955->supplies[i].supply = wm8955_supply_names[i]; 900 wm8955->supplies[i].supply = wm8955_supply_names[i];
909 901
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index f156010e52bc..d04e9cad445c 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -976,12 +976,6 @@ static int wm8960_probe(struct snd_soc_codec *codec)
976 wm8960->set_bias_level = wm8960_set_bias_level_capless; 976 wm8960->set_bias_level = wm8960_set_bias_level_capless;
977 } 977 }
978 978
979 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
980 if (ret < 0) {
981 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
982 return ret;
983 }
984
985 ret = wm8960_reset(codec); 979 ret = wm8960_reset(codec);
986 if (ret < 0) { 980 if (ret < 0) {
987 dev_err(codec->dev, "Failed to issue reset\n"); 981 dev_err(codec->dev, "Failed to issue reset\n");
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index 900328e28a15..db84507c1ec5 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -836,15 +836,8 @@ static struct snd_soc_dai_driver wm8961_dai = {
836static int wm8961_probe(struct snd_soc_codec *codec) 836static int wm8961_probe(struct snd_soc_codec *codec)
837{ 837{
838 struct snd_soc_dapm_context *dapm = &codec->dapm; 838 struct snd_soc_dapm_context *dapm = &codec->dapm;
839 int ret = 0;
840 u16 reg; 839 u16 reg;
841 840
842 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
843 if (ret != 0) {
844 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
845 return ret;
846 }
847
848 /* Enable class W */ 841 /* Enable class W */
849 reg = snd_soc_read(codec, WM8961_CHARGE_PUMP_B); 842 reg = snd_soc_read(codec, WM8961_CHARGE_PUMP_B);
850 reg |= WM8961_CP_DYN_PWR_MASK; 843 reg |= WM8961_CP_DYN_PWR_MASK;
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 97db3b45b411..1d556c945bb2 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3400,13 +3400,6 @@ static int wm8962_probe(struct snd_soc_codec *codec)
3400 bool dmicclk, dmicdat; 3400 bool dmicclk, dmicdat;
3401 3401
3402 wm8962->codec = codec; 3402 wm8962->codec = codec;
3403 codec->control_data = wm8962->regmap;
3404
3405 ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
3406 if (ret != 0) {
3407 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
3408 return ret;
3409 }
3410 3403
3411 wm8962->disable_nb[0].notifier_call = wm8962_regulator_event_0; 3404 wm8962->disable_nb[0].notifier_call = wm8962_regulator_event_0;
3412 wm8962->disable_nb[1].notifier_call = wm8962_regulator_event_1; 3405 wm8962->disable_nb[1].notifier_call = wm8962_regulator_event_1;
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index 67aba78a7ca5..09b7b4200221 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -648,12 +648,6 @@ static int wm8971_probe(struct snd_soc_codec *codec)
648 int ret = 0; 648 int ret = 0;
649 u16 reg; 649 u16 reg;
650 650
651 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
652 if (ret < 0) {
653 printk(KERN_ERR "wm8971: failed to set cache I/O: %d\n", ret);
654 return ret;
655 }
656
657 INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8971_work); 651 INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8971_work);
658 wm8971_workq = create_workqueue("wm8971"); 652 wm8971_workq = create_workqueue("wm8971");
659 if (wm8971_workq == NULL) 653 if (wm8971_workq == NULL)
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index 15f45c7bd833..ea0de269a472 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -593,12 +593,6 @@ static int wm8974_probe(struct snd_soc_codec *codec)
593{ 593{
594 int ret = 0; 594 int ret = 0;
595 595
596 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
597 if (ret < 0) {
598 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
599 return ret;
600 }
601
602 ret = wm8974_reset(codec); 596 ret = wm8974_reset(codec);
603 if (ret < 0) { 597 if (ret < 0) {
604 dev_err(codec->dev, "Failed to issue reset\n"); 598 dev_err(codec->dev, "Failed to issue reset\n");
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c
index d8fc531c0e59..13de3688e86f 100644
--- a/sound/soc/codecs/wm8978.c
+++ b/sound/soc/codecs/wm8978.c
@@ -975,19 +975,13 @@ static const int update_reg[] = {
975static int wm8978_probe(struct snd_soc_codec *codec) 975static int wm8978_probe(struct snd_soc_codec *codec)
976{ 976{
977 struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); 977 struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec);
978 int ret = 0, i; 978 int i;
979 979
980 /* 980 /*
981 * Set default system clock to PLL, it is more precise, this is also the 981 * Set default system clock to PLL, it is more precise, this is also the
982 * default hardware setting 982 * default hardware setting
983 */ 983 */
984 wm8978->sysclk = WM8978_PLL; 984 wm8978->sysclk = WM8978_PLL;
985 codec->control_data = wm8978->regmap;
986 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
987 if (ret < 0) {
988 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
989 return ret;
990 }
991 985
992 /* 986 /*
993 * Set the update bit in all registers, that have one. This way all 987 * Set the update bit in all registers, that have one. This way all
diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
index aa41ba0dfff4..84aa09319ba1 100644
--- a/sound/soc/codecs/wm8983.c
+++ b/sound/soc/codecs/wm8983.c
@@ -1000,12 +1000,6 @@ static int wm8983_probe(struct snd_soc_codec *codec)
1000 int ret; 1000 int ret;
1001 int i; 1001 int i;
1002 1002
1003 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
1004 if (ret < 0) {
1005 dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
1006 return ret;
1007 }
1008
1009 ret = snd_soc_write(codec, WM8983_SOFTWARE_RESET, 0); 1003 ret = snd_soc_write(codec, WM8983_SOFTWARE_RESET, 0);
1010 if (ret < 0) { 1004 if (ret < 0) {
1011 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); 1005 dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index 271b517911a4..64e211cb4bcf 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -1000,13 +1000,6 @@ static int wm8985_probe(struct snd_soc_codec *codec)
1000 int ret; 1000 int ret;
1001 1001
1002 wm8985 = snd_soc_codec_get_drvdata(codec); 1002 wm8985 = snd_soc_codec_get_drvdata(codec);
1003 codec->control_data = wm8985->regmap;
1004
1005 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
1006 if (ret < 0) {
1007 dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
1008 return ret;
1009 }
1010 1003
1011 for (i = 0; i < ARRAY_SIZE(wm8985->supplies); i++) 1004 for (i = 0; i < ARRAY_SIZE(wm8985->supplies); i++)
1012 wm8985->supplies[i].supply = wm8985_supply_names[i]; 1005 wm8985->supplies[i].supply = wm8985_supply_names[i];
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index a55e1c2c382e..424bbf752f3f 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -810,16 +810,8 @@ static int wm8988_resume(struct snd_soc_codec *codec)
810 810
811static int wm8988_probe(struct snd_soc_codec *codec) 811static int wm8988_probe(struct snd_soc_codec *codec)
812{ 812{
813 struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec);
814 int ret = 0; 813 int ret = 0;
815 814
816 codec->control_data = wm8988->regmap;
817 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
818 if (ret < 0) {
819 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
820 return ret;
821 }
822
823 ret = wm8988_reset(codec); 815 ret = wm8988_reset(codec);
824 if (ret < 0) { 816 if (ret < 0) {
825 dev_err(codec->dev, "Failed to issue reset\n"); 817 dev_err(codec->dev, "Failed to issue reset\n");
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 0ccd4d8d043b..1487625551e7 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -1292,14 +1292,6 @@ static int wm8990_resume(struct snd_soc_codec *codec)
1292 */ 1292 */
1293static int wm8990_probe(struct snd_soc_codec *codec) 1293static int wm8990_probe(struct snd_soc_codec *codec)
1294{ 1294{
1295 int ret;
1296
1297 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1298 if (ret < 0) {
1299 printk(KERN_ERR "wm8990: failed to set cache I/O: %d\n", ret);
1300 return ret;
1301 }
1302
1303 wm8990_reset(codec); 1295 wm8990_reset(codec);
1304 1296
1305 /* charge output caps */ 1297 /* charge output caps */
diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c
index 32d219570cca..844cc4a60d66 100644
--- a/sound/soc/codecs/wm8991.c
+++ b/sound/soc/codecs/wm8991.c
@@ -1248,14 +1248,6 @@ static int wm8991_remove(struct snd_soc_codec *codec)
1248 1248
1249static int wm8991_probe(struct snd_soc_codec *codec) 1249static int wm8991_probe(struct snd_soc_codec *codec)
1250{ 1250{
1251 int ret;
1252
1253 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1254 if (ret < 0) {
1255 dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
1256 return ret;
1257 }
1258
1259 wm8991_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1251 wm8991_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1260 1252
1261 return 0; 1253 return 0;
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 433d59a0f3ef..1674a1f33ba0 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -1493,13 +1493,6 @@ static int wm8993_probe(struct snd_soc_codec *codec)
1493 wm8993->hubs_data.dcs_codes_r = -2; 1493 wm8993->hubs_data.dcs_codes_r = -2;
1494 wm8993->hubs_data.series_startup = 1; 1494 wm8993->hubs_data.series_startup = 1;
1495 1495
1496 codec->control_data = wm8993->regmap;
1497 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1498 if (ret != 0) {
1499 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1500 return ret;
1501 }
1502
1503 /* Latch volume update bits and default ZC on */ 1496 /* Latch volume update bits and default ZC on */
1504 snd_soc_update_bits(codec, WM8993_RIGHT_DAC_DIGITAL_VOLUME, 1497 snd_soc_update_bits(codec, WM8993_RIGHT_DAC_DIGITAL_VOLUME,
1505 WM8993_DAC_VU, WM8993_DAC_VU); 1498 WM8993_DAC_VU, WM8993_DAC_VU);
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c
index 4300caff1783..9fd76c9c4e36 100644
--- a/sound/soc/codecs/wm8995.c
+++ b/sound/soc/codecs/wm8995.c
@@ -2047,13 +2047,6 @@ static int wm8995_probe(struct snd_soc_codec *codec)
2047 wm8995 = snd_soc_codec_get_drvdata(codec); 2047 wm8995 = snd_soc_codec_get_drvdata(codec);
2048 wm8995->codec = codec; 2048 wm8995->codec = codec;
2049 2049
2050 codec->control_data = wm8995->regmap;
2051 ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
2052 if (ret < 0) {
2053 dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
2054 return ret;
2055 }
2056
2057 for (i = 0; i < ARRAY_SIZE(wm8995->supplies); i++) 2050 for (i = 0; i < ARRAY_SIZE(wm8995->supplies); i++)
2058 wm8995->supplies[i].supply = wm8995_supply_names[i]; 2051 wm8995->supplies[i].supply = wm8995_supply_names[i];
2059 2052
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 1a7655b0aa22..54066436d72c 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -2628,14 +2628,6 @@ static int wm8996_probe(struct snd_soc_codec *codec)
2628 init_completion(&wm8996->dcs_done); 2628 init_completion(&wm8996->dcs_done);
2629 init_completion(&wm8996->fll_lock); 2629 init_completion(&wm8996->fll_lock);
2630 2630
2631 codec->control_data = wm8996->regmap;
2632
2633 ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
2634 if (ret != 0) {
2635 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
2636 goto err;
2637 }
2638
2639 if (wm8996->pdata.num_retune_mobile_cfgs) 2631 if (wm8996->pdata.num_retune_mobile_cfgs)
2640 wm8996_retune_mobile_pdata(codec); 2632 wm8996_retune_mobile_pdata(codec);
2641 else 2633 else
@@ -2674,13 +2666,11 @@ static int wm8996_probe(struct snd_soc_codec *codec)
2674 } else { 2666 } else {
2675 dev_err(codec->dev, "Failed to request IRQ: %d\n", 2667 dev_err(codec->dev, "Failed to request IRQ: %d\n",
2676 ret); 2668 ret);
2669 return ret;
2677 } 2670 }
2678 } 2671 }
2679 2672
2680 return 0; 2673 return 0;
2681
2682err:
2683 return ret;
2684} 2674}
2685 2675
2686static int wm8996_remove(struct snd_soc_codec *codec) 2676static int wm8996_remove(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index 0982c1d38ec4..cda185d436f7 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1265,15 +1265,6 @@ static struct snd_soc_dai_driver wm9081_dai = {
1265static int wm9081_probe(struct snd_soc_codec *codec) 1265static int wm9081_probe(struct snd_soc_codec *codec)
1266{ 1266{
1267 struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); 1267 struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec);
1268 int ret;
1269
1270 codec->control_data = wm9081->regmap;
1271
1272 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
1273 if (ret != 0) {
1274 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1275 return ret;
1276 }
1277 1268
1278 /* Enable zero cross by default */ 1269 /* Enable zero cross by default */
1279 snd_soc_update_bits(codec, WM9081_ANALOGUE_LINEOUT, 1270 snd_soc_update_bits(codec, WM9081_ANALOGUE_LINEOUT,
@@ -1288,7 +1279,7 @@ static int wm9081_probe(struct snd_soc_codec *codec)
1288 ARRAY_SIZE(wm9081_eq_controls)); 1279 ARRAY_SIZE(wm9081_eq_controls));
1289 } 1280 }
1290 1281
1291 return ret; 1282 return 0;
1292} 1283}
1293 1284
1294static int wm9081_remove(struct snd_soc_codec *codec) 1285static int wm9081_remove(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c
index a07fe1618eec..87934171f063 100644
--- a/sound/soc/codecs/wm9090.c
+++ b/sound/soc/codecs/wm9090.c
@@ -522,16 +522,6 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec,
522 522
523static int wm9090_probe(struct snd_soc_codec *codec) 523static int wm9090_probe(struct snd_soc_codec *codec)
524{ 524{
525 struct wm9090_priv *wm9090 = dev_get_drvdata(codec->dev);
526 int ret;
527
528 codec->control_data = wm9090->regmap;
529 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
530 if (ret != 0) {
531 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
532 return ret;
533 }
534
535 /* Configure some defaults; they will be written out when we 525 /* Configure some defaults; they will be written out when we
536 * bring the bias up. 526 * bring the bias up.
537 */ 527 */