From d4f6fafdf17a3f380a15893196aeacab4a79c10a Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Mon, 30 Apr 2012 18:06:27 -0300 Subject: [PATCH] --- yaml --- r: 306411 b: refs/heads/master c: a39fbb1d747aa88e410d0a25af92cd9e179ba0f4 h: refs/heads/master i: 306409: 3ea107d4c3fbed09876c6182909415fb824ca3ca 306407: ac9beca0f432a33de17cf16b20c797f044ad7330 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/via-camera.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 49f2c4759b43..3f1c6d4cfb4e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3477e2ab0e52fe55999130eee833af9a29e2789a +refs/heads/master: a39fbb1d747aa88e410d0a25af92cd9e179ba0f4 diff --git a/trunk/drivers/media/video/via-camera.c b/trunk/drivers/media/video/via-camera.c index 20f7237b8242..308e150a39bc 100644 --- a/trunk/drivers/media/video/via-camera.c +++ b/trunk/drivers/media/video/via-camera.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -1347,11 +1348,21 @@ static __devinit bool viacam_serial_is_enabled(void) return false; } +static struct ov7670_config sensor_cfg = { + /* The XO-1.5 (only known user) clocks the camera at 90MHz. */ + .clock_speed = 90, +}; + static __devinit int viacam_probe(struct platform_device *pdev) { int ret; struct i2c_adapter *sensor_adapter; struct viafb_dev *viadev = pdev->dev.platform_data; + struct i2c_board_info ov7670_info = { + .type = "ov7670", + .addr = 0x42 >> 1, + .platform_data = &sensor_cfg, + }; /* * Note that there are actually two capture channels on @@ -1433,8 +1444,8 @@ static __devinit int viacam_probe(struct platform_device *pdev) * is OLPC-specific. 0x42 assumption is ov7670-specific. */ sensor_adapter = viafb_find_i2c_adapter(VIA_PORT_31); - cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, sensor_adapter, - "ov7670", 0x42 >> 1, NULL); + cam->sensor = v4l2_i2c_new_subdev_board(&cam->v4l2_dev, sensor_adapter, + &ov7670_info, NULL); if (cam->sensor == NULL) { dev_err(&pdev->dev, "Unable to find the sensor!\n"); ret = -ENODEV;