From a56e97cbb75c0626cec7494cf58c9d795253a0a5 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Tue, 1 Mar 2016 16:51:24 +0100 Subject: 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 Signed-off-by: Stefan Agner --- sound/soc/codecs/sgtl5000.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index c35e02c1ce46..95c0bfa7c781 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1475,8 +1475,10 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, /* read chip information */ ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®); - if (ret) + if (ret) { + ret = -EPROBE_DEFER; goto disable_clk; + } if (((reg & SGTL5000_PARTID_MASK) >> SGTL5000_PARTID_SHIFT) != SGTL5000_PARTID_PART_ID) { -- cgit v1.2.3