diff options
author | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:26:06 -0600 |
---|---|---|
committer | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:26:06 -0600 |
commit | 4c7ac446021b95acb5befcf7a01051730e930359 (patch) | |
tree | 8fe438d615f48f57bf2f38367731fa0af34d8237 | |
parent | 1ab52e7243c0d72f70fe71289ba1a9e4402847d5 (diff) |
Bugzilla 779 - Fix OV2460 camera driver oopsen
Patch for Bugzilla 779 - Fix OV2460 camera driver oopsen on linux 2.6.22
kernel for MX platforms. Added stubs for new routines required in the
camera interface structure. This camera driver should be considered a
prototype. It does not have all the functionality of the others.
http://www.bitshrine.org/gpp/linux-2.6.22-mx-Bugzilla-779-Fix-OV2460-camera-driver-oops.patch
-rw-r--r-- | drivers/media/video/mxc/capture/ov2640.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/media/video/mxc/capture/ov2640.c b/drivers/media/video/mxc/capture/ov2640.c index 20f1be44a50d..5fb6b4385815 100644 --- a/drivers/media/video/mxc/capture/ov2640.c +++ b/drivers/media/video/mxc/capture/ov2640.c @@ -678,7 +678,6 @@ static sensor_interface *ov2640_config(int *frame_rate, int high_quality) PRINTK("%s:REGU_GPO3 power on ok\n", __func__); } PRINTK("%s:OV2640 power on ok\n", __func__); - gpio_sensor_active(); if (high_quality) { out_width = 1600; @@ -722,18 +721,32 @@ static sensor_interface *ov2640_config(int *frame_rate, int high_quality) return interface_param; } +static void ov2640_get_control_params(int *ae, int *awb, int *flicker) +{ + *ae = 0; + *awb = 0; + *flicker = 0; +} + static sensor_interface *ov2640_reset(void) { return ov2640_config(&reset_frame_rate, 0); } +static int ov2640_get_status(void) +{ + return 0; +} + struct camera_sensor camera_sensor_if = { .set_color = ov2640_set_color, .get_color = ov2640_get_color, .set_ae_mode = ov2640_set_ae_mode, .get_ae_mode = ov2640_get_ae_mode, + .get_control_params = ov2640_get_control_params, .config = ov2640_config, .reset = ov2640_reset, + .get_status = ov2640_get_status, }; EXPORT_SYMBOL(camera_sensor_if); @@ -747,6 +760,8 @@ static __init int ov2640_init(void) { u8 err; + gpio_sensor_active(); + err = i2c_add_driver(&ov2640_i2c_driver); return err; |