diff options
Diffstat (limited to 'drivers/media/video/gspca/m5602/m5602_ov9650.c')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c index 76317e274bf..bbf91356096 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.c +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c | |||
@@ -147,8 +147,14 @@ int ov9650_start(struct sd *sd) | |||
147 | int i, err = 0; | 147 | int i, err = 0; |
148 | struct cam *cam = &sd->gspca_dev.cam; | 148 | struct cam *cam = &sd->gspca_dev.cam; |
149 | 149 | ||
150 | for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) | 150 | for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) { |
151 | err = m5602_write_bridge(sd, res_init_ov9650[i][0], res_init_ov9650[i][1]); | 151 | if (res_init_ov9650[i][0] == BRIDGE) |
152 | err = m5602_write_bridge(sd, res_init_ov9650[i][1], res_init_ov9650[i][2]); | ||
153 | else if (res_init_ov9650[i][0] == SENSOR) { | ||
154 | u8 data = res_init_ov9650[i][2]; | ||
155 | err = m5602_write_sensor(sd, res_init_ov9650[i][1], &data, 1); | ||
156 | } | ||
157 | } | ||
152 | if (err < 0) | 158 | if (err < 0) |
153 | return err; | 159 | return err; |
154 | 160 | ||
@@ -217,6 +223,12 @@ int ov9650_start(struct sd *sd) | |||
217 | return err; | 223 | return err; |
218 | } | 224 | } |
219 | 225 | ||
226 | int ov9650_stop(struct sd *sd) | ||
227 | { | ||
228 | u8 data = OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X; | ||
229 | return m5602_write_sensor(sd, OV9650_COM2, &data, 1); | ||
230 | } | ||
231 | |||
220 | int ov9650_power_down(struct sd *sd) | 232 | int ov9650_power_down(struct sd *sd) |
221 | { | 233 | { |
222 | int i, err = 0; | 234 | int i, err = 0; |