aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/tlv320aic3x.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 5356946fb6b2..fc687790188b 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1341,9 +1341,6 @@ static int aic3x_init(struct snd_soc_codec *codec)
1341 snd_soc_write(codec, CLASSD_CTRL, 0); 1341 snd_soc_write(codec, CLASSD_CTRL, 0);
1342 } 1342 }
1343 1343
1344 /* off, with power on */
1345 aic3x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1346
1347 return 0; 1344 return 0;
1348} 1345}
1349 1346
@@ -1354,6 +1351,7 @@ static int aic3x_probe(struct snd_soc_codec *codec)
1354 1351
1355 codec->control_data = aic3x->control_data; 1352 codec->control_data = aic3x->control_data;
1356 aic3x->codec = codec; 1353 aic3x->codec = codec;
1354 codec->idle_bias_off = 1;
1357 1355
1358 ret = snd_soc_codec_set_cache_io(codec, 8, 8, aic3x->control_type); 1356 ret = snd_soc_codec_set_cache_io(codec, 8, 8, aic3x->control_type);
1359 if (ret != 0) { 1357 if (ret != 0) {
@@ -1390,19 +1388,7 @@ static int aic3x_probe(struct snd_soc_codec *codec)
1390 } 1388 }
1391 } 1389 }
1392 1390
1393 ret = regulator_bulk_enable(ARRAY_SIZE(aic3x->supplies), 1391 codec->cache_only = 1;
1394 aic3x->supplies);
1395 if (ret != 0) {
1396 dev_err(codec->dev, "Failed to enable supplies: %d\n", ret);
1397 goto err_enable;
1398 }
1399 aic3x->power = 1;
1400
1401 if (aic3x->gpio_reset >= 0) {
1402 udelay(1);
1403 gpio_set_value(aic3x->gpio_reset, 1);
1404 }
1405
1406 aic3x_init(codec); 1392 aic3x_init(codec);
1407 1393
1408 if (aic3x->setup) { 1394 if (aic3x->setup) {
@@ -1422,7 +1408,6 @@ static int aic3x_probe(struct snd_soc_codec *codec)
1422 1408
1423 return 0; 1409 return 0;
1424 1410
1425err_enable:
1426err_notif: 1411err_notif:
1427 while (i--) 1412 while (i--)
1428 regulator_unregister_notifier(aic3x->supplies[i].consumer, 1413 regulator_unregister_notifier(aic3x->supplies[i].consumer,
@@ -1446,7 +1431,6 @@ static int aic3x_remove(struct snd_soc_codec *codec)
1446 gpio_set_value(aic3x->gpio_reset, 0); 1431 gpio_set_value(aic3x->gpio_reset, 0);
1447 gpio_free(aic3x->gpio_reset); 1432 gpio_free(aic3x->gpio_reset);
1448 } 1433 }
1449 regulator_bulk_disable(ARRAY_SIZE(aic3x->supplies), aic3x->supplies);
1450 for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++) 1434 for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++)
1451 regulator_unregister_notifier(aic3x->supplies[i].consumer, 1435 regulator_unregister_notifier(aic3x->supplies[i].consumer,
1452 &aic3x->disable_nb[i].nb); 1436 &aic3x->disable_nb[i].nb);