Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'omap-2.6.31' of http://github.com/dirjud/bl-linux-omap

  • Loading branch information...
commit 154210304054ba1693fbbbbfda23eba5011b89e1 2 parents 610fe48 + 609e482
David Findlay authored
Showing with 12 additions and 4 deletions.
  1. +12 −4 drivers/bmi/pims/camera/mt9t111.c
View
16 drivers/bmi/pims/camera/mt9t111.c
@@ -336,6 +336,7 @@ static int mt9t111_loaddefault(struct i2c_client *client)
// return err;
//
//return mt9t111_refresh(client);
+ sensor->format.width = sensor->format.height = 1;
return 0;
}
@@ -413,6 +414,13 @@ int mt9t111_set_format(struct i2c_client *client, struct v4l2_mbus_framefmt *fmt
int ret;
struct mt9t111_sensor *sensor = i2c_get_clientdata(client);
+ if(sensor->format.width == fmt->width &&
+ sensor->format.height == fmt->height &&
+ sensor->format.code == fmt->code) {
+ printk(KERN_INFO "%s: Sensor already in requested format (%dx%d).\n", __func__, fmt->width, fmt->height);
+ return 0;
+ }
+
// clamp width and height to multiples of 16
fmt->width = (fmt->width / 16) * 16;
fmt->height = (fmt->height / 16) * 16;
@@ -914,16 +922,16 @@ static int mt9t111_probe(struct i2c_client *client,
i2c_set_clientdata(client, sensor);
sensor->client = client;
- sensor->format.width = 640;
- sensor->format.height = 480;
+ sensor->format.width = 1;
+ sensor->format.height = 1;
sensor->format.code = V4L2_MBUS_FMT_YUYV16_1X16;
sensor->format.colorspace = V4L2_COLORSPACE_SRGB;
sensor->format.field = V4L2_FIELD_NONE;
sensor->frame_interval.numerator = 1;
sensor->frame_interval.denominator= 22;
sensor->test_pat_id = 0;
- sensor->colorfx_id = 0;
- sensor->streaming = 0;
+ sensor->colorfx_id = 0;
+ sensor->streaming = 0;
return 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.