Adrian,
Remember this...
Code:
--------------------
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index be219ac..540ce8b 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1482,6 +1482,17 @@ static int sgtl5000_enable_regulators(struct
snd_soc_codec *codec)
/* read chip information */
reg = snd_soc_read(codec, SGTL5000_CHIP_ID);
+
+ /* AS addition - work around initial read being timedout
+ this can occur with i2c_transfer returning -ETIMEDOUT - not sure why
at present...
+ */
+ int try_read = 5;
+ while (!reg && --try_read) {
+ dev_info(codec->dev, "sgtl5000 retry read\n");
+ udelay(10);
+ reg = snd_soc_read(codec, SGTL5000_CHIP_ID);
+ }
+
if (((reg & SGTL5000_PARTID_MASK) >> SGTL5000_PARTID_SHIFT) !=
SGTL5000_PARTID_PART_ID) {
dev_err(codec->dev,
--------------------
Was just browsing 3.18.7 stable changes....
'ASoC: sgtl5000: add delay before first I2C access'
(https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.18.y&id=085d9e9eeac3a48b6abc5bcd4ba9c92629d5c31b)
------------------------------------------------------------------------
JackOfAll's Profile: http://forums.slimdevices.com/member.php?userid=3069
View this thread: http://forums.slimdevices.com/showthread.php?t=101624
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix