summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2016-03-01 16:51:24 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2016-06-24 14:46:17 +0200
commit150c9ee190ebd236f7693b82b9328d49440d0a33 (patch)
treee480763ddeba95275225184cb639c7233569c17b /sound
parent3d4e2d3590739ee3a3e187b41c832190ff457830 (diff)
sgtl5000.c: HACK, defer probe when I2C not yet running
Without MCLK the sgtl5000 does not answer I2C reads. So defere probing to later if no sgtl5000 is found. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sgtl5000.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 3a29c0ac5d8a..0a423e437711 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1463,8 +1463,10 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
/* read chip information */
ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, &reg);
- if (ret)
+ if (ret) {
+ ret = -EPROBE_DEFER;
goto disable_clk;
+ }
if (((reg & SGTL5000_PARTID_MASK) >> SGTL5000_PARTID_SHIFT) !=
SGTL5000_PARTID_PART_ID) {