26 Jun
2013
26 Jun
'13
10:33 a.m.
On Tue, Jun 25, 2013 at 11:00:01AM -0300, Fabio Estevam wrote:
In case of I2C error, let's defer the probe.
On mx28, for example, the first read of the codec revision register fails because there is no codec clock provided at this point. The codec clock will be enabled later in the mxs-saif driver, so return -EPROBE_DEFER in case of I2C read error, so that the codec driver can do another attempt at a later stage when the codec clock is available.
This doesn't seem to match up with the code:
ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®);
- if (ret)
if (ret) {
ret = -EPROBE_DEFER; /* If I2C read failed, try again later */
goto disable_clk;
}
Looking at the label we jump to here it seems like the clock really should be enabled at the point where the register read is attempted...