diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/mt9m001.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c index 750ce60abac..3555e853e5c 100644 --- a/drivers/media/video/mt9m001.c +++ b/drivers/media/video/mt9m001.c | |||
@@ -166,45 +166,6 @@ static int mt9m001_s_stream(struct v4l2_subdev *sd, int enable) | |||
166 | return 0; | 166 | return 0; |
167 | } | 167 | } |
168 | 168 | ||
169 | static int mt9m001_set_bus_param(struct soc_camera_device *icd, | ||
170 | unsigned long flags) | ||
171 | { | ||
172 | struct soc_camera_link *icl = to_soc_camera_link(icd); | ||
173 | unsigned long width_flag = flags & SOCAM_DATAWIDTH_MASK; | ||
174 | |||
175 | /* Only one width bit may be set */ | ||
176 | if (!is_power_of_2(width_flag)) | ||
177 | return -EINVAL; | ||
178 | |||
179 | if (icl->set_bus_param) | ||
180 | return icl->set_bus_param(icl, width_flag); | ||
181 | |||
182 | /* | ||
183 | * Without board specific bus width settings we only support the | ||
184 | * sensors native bus width | ||
185 | */ | ||
186 | if (width_flag == SOCAM_DATAWIDTH_10) | ||
187 | return 0; | ||
188 | |||
189 | return -EINVAL; | ||
190 | } | ||
191 | |||
192 | static unsigned long mt9m001_query_bus_param(struct soc_camera_device *icd) | ||
193 | { | ||
194 | struct soc_camera_link *icl = to_soc_camera_link(icd); | ||
195 | /* MT9M001 has all capture_format parameters fixed */ | ||
196 | unsigned long flags = SOCAM_PCLK_SAMPLE_FALLING | | ||
197 | SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH | | ||
198 | SOCAM_DATA_ACTIVE_HIGH | SOCAM_MASTER; | ||
199 | |||
200 | if (icl->query_bus_param) | ||
201 | flags |= icl->query_bus_param(icl) & SOCAM_DATAWIDTH_MASK; | ||
202 | else | ||
203 | flags |= SOCAM_DATAWIDTH_10; | ||
204 | |||
205 | return soc_camera_apply_sensor_flags(icl, flags); | ||
206 | } | ||
207 | |||
208 | static int mt9m001_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | 169 | static int mt9m001_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) |
209 | { | 170 | { |
210 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 171 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
@@ -461,8 +422,6 @@ static const struct v4l2_queryctrl mt9m001_controls[] = { | |||
461 | }; | 422 | }; |
462 | 423 | ||
463 | static struct soc_camera_ops mt9m001_ops = { | 424 | static struct soc_camera_ops mt9m001_ops = { |
464 | .set_bus_param = mt9m001_set_bus_param, | ||
465 | .query_bus_param = mt9m001_query_bus_param, | ||
466 | .controls = mt9m001_controls, | 425 | .controls = mt9m001_controls, |
467 | .num_controls = ARRAY_SIZE(mt9m001_controls), | 426 | .num_controls = ARRAY_SIZE(mt9m001_controls), |
468 | }; | 427 | }; |