mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ASoC: rt5640: fix rt5640_i2c_probe fail sometimes
if the codec is not initialized completely, i2c transfer will be failed, so we just return PROBE_DEFER to let codec have chance to be probed later. Change-Id: I68922ffa7ddf048ebe3f95be9349d38b7b059982 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
committed by
Gerrit Code Review
parent
91270fe3f5
commit
fb2723796e
@@ -2337,7 +2337,10 @@ static int rt5640_i2c_probe(struct i2c_client *i2c,
|
||||
msleep(400);
|
||||
}
|
||||
|
||||
regmap_read(rt5640->regmap, RT5640_VENDOR_ID2, &val);
|
||||
ret = regmap_read(rt5640->regmap, RT5640_VENDOR_ID2, &val);
|
||||
if (ret)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
if (val != RT5640_DEVICE_ID) {
|
||||
dev_err(&i2c->dev,
|
||||
"Device with ID register %#x is not rt5640/39\n", val);
|
||||
|
||||
Reference in New Issue
Block a user