summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2015-01-29 15:37:22 -0700
committerMax Krummenacher <max.krummenacher@toradex.com>2015-03-09 16:40:31 +0100
commite7a905531c637477202665b3f64815844076b5f8 (patch)
treed4bcbd6e512571d34e2eacf0943e55fcc2a7d9af /sound
parent67d992559773f1029d8d49516ff642e56563eac4 (diff)
Revert "ASoC: sgtl5000: Fix driver probe after reset"
This reverts commit 3d64385594ab68f6818fac19e40e8a587790f8cf. Pull from mainline was naive and requires additional precursor work. (cherry picked from commit 74cfed78c018c768a6026aef0781b8429276efcc)
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sgtl5000.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index b4631b6b5d74..42db742ebe42 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1468,31 +1468,6 @@ static s32 sgtl5000_write16(struct i2c_client *client, u16 reg, u16 val)
return (ret < 0) ? ret : -EIO;
}
-/*
- * Write all the default values from sgtl5000_reg_defaults[] array into the
- * sgtl5000 registers, to make sure we always start with the sane registers
- * values as stated in the datasheet.
- *
- * Since sgtl5000 does not have a reset line, nor a reset command in software,
- * we follow this approach to guarantee we always start from the default values
- * and avoid problems like, not being able to probe after an audio playback
- * followed by a system reset or a 'reboot' command in Linux
- */
-static int sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000)
-{
- int i, ret, val, index;
-
- for (i = 0; i < ARRAY_SIZE(sgtl5000_reg_defaults); i++) {
- val = sgtl5000_reg_defaults[i].def;
- index = sgtl5000_reg_defaults[i].reg;
- ret = regmap_write(sgtl5000->regmap, index, val);
- if (ret)
- return ret;
- }
-
- return 0;
-}
-
static int sgtl5000_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
@@ -1544,11 +1519,6 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
i2c_set_clientdata(client, sgtl5000);
- /* Ensure sgtl5000 will start with sane register values */
- ret = sgtl5000_fill_defaults(sgtl5000);
- if (ret)
- return ret;
-
ret = snd_soc_register_codec(&client->dev,
&sgtl5000_driver, &sgtl5000_dai, 1);
if (ret)