/* trigger write */
ret = dev->em28xx_write_regs(dev, 4 - len, &b2[4 - len], 2 + len);
if (ret != 2 + len) {
- em28xx_warn("failed to trigger write to i2c address 0x%x "
- "(error=%i)\n", addr, ret);
+ em28xx_warn("failed to trigger write to i2c address 0x%x (error=%i)\n",
+ addr, ret);
return (ret < 0) ? ret : -EIO;
}
/* wait for completion */
} else if (ret == 0x94 + len - 1) {
return -ENODEV;
} else if (ret < 0) {
- em28xx_warn("failed to get i2c transfer status from "
- "bridge register (error=%i)\n", ret);
+ em28xx_warn("failed to get i2c transfer status from bridge register (error=%i)\n",
+ ret);
return ret;
}
msleep(5);
buf2[0] = addr;
ret = dev->em28xx_write_regs(dev, 0x04, buf2, 2);
if (ret != 2) {
- em28xx_warn("failed to trigger read from i2c address 0x%x "
- "(error=%i)\n", addr, ret);
+ em28xx_warn("failed to trigger read from i2c address 0x%x (error=%i)\n",
+ addr, ret);
return (ret < 0) ? ret : -EIO;
}
} else if (ret == 0x94 + len - 1) {
return -ENODEV;
} else if (ret < 0) {
- em28xx_warn("failed to get i2c transfer status from "
- "bridge register (error=%i)\n", ret);
+ em28xx_warn("failed to get i2c transfer status from bridge register (error=%i)\n",
+ ret);
return ret;
}
msleep(5);
/* get the received message */
ret = dev->em28xx_read_reg_req_len(dev, 0x00, 4-len, buf2, len);
if (ret != len) {
- em28xx_warn("reading from i2c device at 0x%x failed: "
- "couldn't get the received message from the bridge "
- "(error=%i)\n", addr, ret);
+ em28xx_warn("reading from i2c device at 0x%x failed: couldn't get the received message from the bridge (error=%i)\n",
+ addr, ret);
return (ret < 0) ? ret : -EIO;
}
for (i = 0; i < len; i++)
ret = dev->em28xx_write_regs_req(dev, stop ? 2 : 3, addr, buf, len);
if (ret != len) {
if (ret < 0) {
- em28xx_warn("writing to i2c device at 0x%x failed "
- "(error=%i)\n", addr, ret);
+ em28xx_warn("writing to i2c device at 0x%x failed (error=%i)\n",
+ addr, ret);
return ret;
} else {
- em28xx_warn("%i bytes write to i2c device at 0x%x "
- "requested, but %i bytes written\n",
+ em28xx_warn("%i bytes write to i2c device at 0x%x requested, but %i bytes written\n",
len, addr, ret);
return -EIO;
}
} else if (ret == 0x10) {
return -ENODEV;
} else if (ret < 0) {
- em28xx_warn("failed to read i2c transfer status from "
- "bridge (error=%i)\n", ret);
+ em28xx_warn("failed to read i2c transfer status from bridge (error=%i)\n",
+ ret);
return ret;
}
msleep(5);
/* Check success of the i2c operation */
ret = dev->em28xx_read_reg(dev, 0x05);
if (ret < 0) {
- em28xx_warn("failed to read i2c transfer status from "
- "bridge (error=%i)\n", ret);
+ em28xx_warn("failed to read i2c transfer status from bridge (error=%i)\n",
+ ret);
return ret;
}
if (ret > 0) {
dev->hash = em28xx_hash_mem(data, len, 32);
mc_start = (data[1] << 8) + 4; /* usually 0x0004 */
- em28xx_info("EEPROM ID = %02x %02x %02x %02x, "
- "EEPROM hash = 0x%08lx\n",
+ em28xx_info("EEPROM ID = %02x %02x %02x %02x, EEPROM hash = 0x%08lx\n",
data[0], data[1], data[2], data[3], dev->hash);
em28xx_info("EEPROM info:\n");
- em28xx_info("\tmicrocode start address = 0x%04x, "
- "boot configuration = 0x%02x\n",
+ em28xx_info("\tmicrocode start address = 0x%04x, boot configuration = 0x%02x\n",
mc_start, data[2]);
/* boot configuration (address 0x0002):
* [0] microcode download speed: 1 = 400 kHz; 0 = 100 kHz
data[0] == 0x1a && data[1] == 0xeb &&
data[2] == 0x67 && data[3] == 0x95) {
dev->hash = em28xx_hash_mem(data, len, 32);
- em28xx_info("EEPROM ID = %02x %02x %02x %02x, "
- "EEPROM hash = 0x%08lx\n",
+ em28xx_info("EEPROM ID = %02x %02x %02x %02x, EEPROM hash = 0x%08lx\n",
data[0], data[1], data[2], data[3], dev->hash);
em28xx_info("EEPROM info:\n");
} else {