diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-01 16:51:24 +0100 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-10-05 17:03:22 -0300 |
commit | 48186c5e4c7946e4470c6334fee45a2447f273a7 (patch) | |
tree | e1e09e1c146ee8cbc90264f03582cbe13bae68e9 /sound | |
parent | 475994755fda9eaf195eda94428e8d99c6a3586a (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>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.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 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, ®); - if (ret) + if (ret) { + ret = -EPROBE_DEFER; goto disable_clk; + } if (((reg & SGTL5000_PARTID_MASK) >> SGTL5000_PARTID_SHIFT) != SGTL5000_PARTID_PART_ID) { |