diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-01 16:51:24 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-09 10:01:52 +0100 |
commit | a56e97cbb75c0626cec7494cf58c9d795253a0a5 (patch) | |
tree | 95ebd291f4668b73b9ef09ed203b70de0daf3d5f /sound | |
parent | 116d8dd7e7b5640748319fefe267bf05bcab3adf (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |