From 7aa5ce62824ba42fe05b53c5e3c34899390524ac Mon Sep 17 00:00:00 2001 From: Brian Johnson Date: Tue, 6 Jan 2009 18:04:14 -0500 Subject: [PATCH] Removed ov7660_set_exposure This was identical to ov965x_set_exposure. Removed it and renamed ov965x_set_exposure to ov_set_exposure Signed-off-by: Brian Johnson --- omnivision.c | 24 ++---------------------- omnivision.h | 4 +--- sn9c20x-dev.c | 7 ++++--- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/omnivision.c b/omnivision.c index 2f0fcf6..015eccb 100644 --- a/omnivision.c +++ b/omnivision.c @@ -502,26 +502,6 @@ struct sn9c20x_i2c_regs ov9655_init[] = { }; /** - * @brief Set exposure for ov7660 sensors - * - * @param dev - * - * @return 0 or negative error value - * - * @author Neekhil -*/ -int ov7660_set_exposure(struct usb_sn9c20x *dev) -{ - int ret = 0; - __u8 val[2] = {(dev->vsettings.exposure & 0x0F) << 4, - dev->vsettings.exposure >> 4}; - - ret = sn9c20x_write_i2c_data_ext(dev, 2, 0x2d, val, 0x1e); - - return ret; -} - -/** * @brief OV7670 Auto-Flip * * @param dev Pointer to the device @@ -587,7 +567,7 @@ int ov965x_set_hvflip(struct usb_sn9c20x *dev) } /** - * @brief Set exposure for ov965x sensors + * @brief Set exposure for omnivision sensors * * @param dev * @@ -596,7 +576,7 @@ int ov965x_set_hvflip(struct usb_sn9c20x *dev) * The used registers do not show up the datasheets. * */ -int ov965x_set_exposure(struct usb_sn9c20x *dev) +int ov_set_exposure(struct usb_sn9c20x *dev) { int ret = 0; __u8 val[2] = {(dev->vsettings.exposure & 0x0F) << 4, diff --git a/omnivision.h b/omnivision.h index 3c382ab..f5bd7e9 100644 --- a/omnivision.h +++ b/omnivision.h @@ -531,8 +531,6 @@ #define OV965X_COM15_OUTPUT_RGB_555 0x30 #define OV965X_COM15_SWAP_R_AND_B 0x08 -int ov7660_set_exposure(struct usb_sn9c20x *); - int ov7670_auto_flip(struct usb_sn9c20x *, __u8); int ov7670_flip_detect(struct usb_sn9c20x *dev); @@ -541,9 +539,9 @@ int soi968_button_detect(struct usb_sn9c20x *dev); int soi968_set_gain(struct usb_sn9c20x *dev); int ov965x_set_hvflip(struct usb_sn9c20x *); -int ov965x_set_exposure(struct usb_sn9c20x *); int ov965x_flip_detect(struct usb_sn9c20x *dev); +int ov_set_exposure(struct usb_sn9c20x *); int ov_set_autogain(struct usb_sn9c20x *dev); int ov_set_autoexposure(struct usb_sn9c20x *dev); #endif diff --git a/sn9c20x-dev.c b/sn9c20x-dev.c index f1107ae..f73b0ee 100644 --- a/sn9c20x-dev.c +++ b/sn9c20x-dev.c @@ -142,7 +142,7 @@ int sn9c20x_initialize_sensor(struct usb_sn9c20x *dev) dev->camera.hstart = 1; dev->camera.vstart = 7; dev->camera.set_hvflip = ov965x_set_hvflip; - dev->camera.set_exposure = ov965x_set_exposure; + dev->camera.set_exposure = ov_set_exposure; dev->camera.set_auto_gain = ov_set_autogain; dev->camera.flip_detect = ov965x_flip_detect; UDIA_INFO("Detected OV9650 Sensor.\n"); @@ -150,6 +150,7 @@ int sn9c20x_initialize_sensor(struct usb_sn9c20x *dev) case OV9655_SENSOR: sn9c20x_write_i2c_array(dev, ov9655_init, 0); dev->camera.set_auto_exposure = ov_set_autoexposure; + dev->camera.set_exposure = ov_set_exposure; dev->camera.set_auto_gain = ov_set_autogain; dev->camera.hstart = 0; dev->camera.vstart = 7; @@ -158,7 +159,7 @@ int sn9c20x_initialize_sensor(struct usb_sn9c20x *dev) case OV7670_SENSOR: sn9c20x_write_i2c_array(dev, ov7670_init, 0); dev->camera.set_auto_exposure = ov_set_autoexposure; - dev->camera.set_exposure = ov7660_set_exposure; + dev->camera.set_exposure = ov_set_exposure; dev->camera.set_auto_gain = ov_set_autogain; dev->camera.flip_detect = ov7670_flip_detect; dev->camera.hstart = 0; @@ -167,7 +168,7 @@ int sn9c20x_initialize_sensor(struct usb_sn9c20x *dev) break; case OV7660_SENSOR: sn9c20x_write_i2c_array(dev, ov7660_init, 0); - dev->camera.set_exposure = ov7660_set_exposure; + dev->camera.set_exposure = ov_set_exposure; dev->camera.set_auto_gain = ov_set_autogain; dev->camera.hstart = 1; dev->camera.vstart = 1; -- 2.11.4.GIT