  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, 2847 insertions(+), 3 deletions(-)
+ 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

+	}
+
+	if (ret < 0) {
+		dev_err(&client->dev,
+			"read fail: chip 0x%x register 0x%x\n", client->addr,
+								reg);
+	} else {
+		*val = ret;
+	}
+
+	return ret;
+}
+
+static inline int maxim_reg8_write(struct i2c_client *client, u8 reg, u8 val)
+{
+	int ret;
+	int retries = MAXIM_NUM_RETRIES;
+
+	for (retries = MAXIM_NUM_RETRIES; retries; retries--) {
+		ret = i2c_smbus_write_byte_data(client, reg, val);

+		}
+	}
+
+	i2c_set_clientdata(client, priv);
+	priv->des_addr = client->addr;
+	priv->links = links;
+	priv->is10bit = 0;
+
+	max9286_max9271_preinit(client);
+	max9286_max9271_initial_setup(client);
+
+	for (idx = priv->offset; idx < links + priv->offset; idx++) {
+		/* SETUP CAMx (MAX9286/MAX9271/SENSOR) I2C */
+		dev_info(&client->dev, "link%d (MAX9286/MAX9271/SENSOR) i2c: 0x%x<->0x%x<->0x%x\n", idx,
+				       maxim_map[0][idx], maxim_map[1][idx], maxim_map[2][idx]);
+
+		max9286_max9271_reverse_channel_setup(client, idx);
+		max9286_max9271_gmsl_link_setup(client, idx);
+	}
+
+	max9286_max9271_gmsl_enable(client);
+
+	/* release des_addr to use it in sensor subdevice */
+	client->addr = priv->des_addr - 0x40;
+
+	return 0;
+}
+
+static int max9286_max9271_remove(struct i2c_client *client)
+{
+	struct max9286_max9271_priv *priv = i2c_get_clientdata(client);
+
+	/* revert des_addr - needed when used as module */
+	client->addr = priv->des_addr;
+
+	return 0;
+}
+
