 +	struct i2c_client *client = v4l2_get_subdevdata(sd);
 +	struct ov490_priv *priv = to_ov490(client);
 +
-+	rect->left = 0;
-+	rect->top = 0;
-+	rect->width = priv->width;
-+	rect->height = priv->height;
++	rect->left = ALIGN(rect->left, 2);
++	rect->top = ALIGN(rect->top, 2);
++	rect->width = ALIGN(rect->width, 2);
++	rect->height = ALIGN(rect->height, 2);
++
++	if ((rect->left + rect->width > OV10635_MAX_WIDTH) ||
++	    (rect->top + rect->height > OV10635_MAX_HEIGHT))
++		*rect = priv->rect;
++
++	priv->rect.left = rect->left;
++	priv->rect.top = rect->top;
++	priv->rect.width = rect->width;
++	priv->rect.height = rect->height;
 +
 +	return 0;
 +}

+MODULE_LICENSE("GPL");
diff --git a/drivers/media/i2c/soc_camera/ov490_ov10640.c b/drivers/media/i2c/soc_camera/ov490_ov10640.c
new file mode 100644
index 0000000..38539f0
--- /dev/null
+++ b/drivers/media/i2c/soc_camera/ov490_ov10640.c
@@ -0,0 +1,919 @@
+/*
+ * OmniVision ov490-ov10640 sensor camera driver
+ *

+			 struct v4l2_subdev_format *format)
+{
+	struct v4l2_mbus_framefmt *mf = &format->format;
+
+	mf->code = MEDIA_BUS_FMT_YUYV8_2X8;
+	mf->colorspace = V4L2_COLORSPACE_SMPTE170M;
+	mf->field = V4L2_FIELD_NONE;
+
+	if (format->which == V4L2_SUBDEV_FORMAT_TRY)
+		cfg->try_fmt = *mf;
+
+	return 0;
+}
