if (ret == 0x80 + len - 1)
return len;
if (ret == 0x94 + len - 1) {
+ if (i2c_debug == 1)
+ em28xx_warn("R05 returned 0x%02x: I2C timeout",
+ ret);
return -ENXIO;
}
if (ret < 0) {
if (ret == 0x84 + len - 1)
break;
if (ret == 0x94 + len - 1) {
+ if (i2c_debug == 1)
+ em28xx_warn("R05 returned 0x%02x: I2C timeout",
+ ret);
return -ENXIO;
}
if (ret < 0) {
if (ret == 0) /* success */
return len;
if (ret == 0x10) {
+ if (i2c_debug == 1)
+ em28xx_warn("I2C transfer timeout on writing to addr 0x%02x",
+ addr);
return -ENXIO;
}
if (ret < 0) {
ret);
return ret;
}
- if (ret == 0x10)
+ if (ret == 0x10) {
+ if (i2c_debug == 1)
+ em28xx_warn("I2C transfer timeout on writing to addr 0x%02x",
+ addr);
return -ENXIO;
+ }
em28xx_warn("unknown i2c error (status=%i)\n", ret);
return -ETIMEDOUT;
*/
if (!ret)
return len;
- else if (ret > 0)
+ else if (ret > 0) {
+ if (i2c_debug == 1)
+ em28xx_warn("Bus B R08 returned 0x%02x: I2C timeout",
+ ret);
return -ENXIO;
+ }
return ret;
/*
*/
if (!ret)
return len;
- else if (ret > 0)
+ else if (ret > 0) {
+ if (i2c_debug == 1)
+ em28xx_warn("Bus B R08 returned 0x%02x: I2C timeout",
+ ret);
return -ENXIO;
+ }
return ret;
/*