 +		ret = maxim_reg16_read(client, regs[i], &val);
 +		if (ret < 0)
 +			dev_err(&client->dev,
-+				"read fail: chip 0x%x register 0x%02x\n",
-+				client->addr, regs[i]);
++				"read fail: chip 0x%x register 0x%02x: %d\n",
++				client->addr, regs[i], ret);
 +		printk("0x%02x -> 0x%x\n", regs[i], val);
 +	}
 +}

+#endif
+	}
+
+	return ret;
+}
+
+static inline int maxim_reg16_read(struct i2c_client *client, u16 reg, u8 *val)
+{
+	int ret;
+	int retries = MAXIM_NUM_RETRIES;
+	u8 buf[2] = {reg >> 8, reg & 0xff};
+
+	for (retries = MAXIM_NUM_RETRIES; retries; retries--) {

 drivers/media/platform/soc_camera/rcar_vin.c       |    4 +
 drivers/media/platform/soc_camera/soc_mediabus.c   |   16 +
 include/media/drv-intf/soc_mediabus.h              |    3 +
 13 files changed, 2922 insertions(+), 3 deletions(-)
 create mode 100644 drivers/media/i2c/soc_camera/max9286_max9271.c
 create mode 100644 drivers/media/i2c/soc_camera/max9286_max9271.h
 create mode 100644 drivers/media/i2c/soc_camera/max9286_max9271_ov10635.c
