diff options
| -rw-r--r-- | drivers/media/video/ov2640.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/media/video/ov2640.c b/drivers/media/video/ov2640.c index 31f361ed7cc5..2826aff5ea27 100644 --- a/drivers/media/video/ov2640.c +++ b/drivers/media/video/ov2640.c | |||
| @@ -701,44 +701,6 @@ static int ov2640_s_stream(struct v4l2_subdev *sd, int enable) | |||
| 701 | return 0; | 701 | return 0; |
| 702 | } | 702 | } |
| 703 | 703 | ||
| 704 | static int ov2640_set_bus_param(struct soc_camera_device *icd, | ||
| 705 | unsigned long flags) | ||
| 706 | { | ||
| 707 | struct soc_camera_link *icl = to_soc_camera_link(icd); | ||
| 708 | unsigned long width_flag = flags & SOCAM_DATAWIDTH_MASK; | ||
| 709 | |||
| 710 | /* Only one width bit may be set */ | ||
| 711 | if (!is_power_of_2(width_flag)) | ||
| 712 | return -EINVAL; | ||
| 713 | |||
| 714 | if (icl->set_bus_param) | ||
| 715 | return icl->set_bus_param(icl, width_flag); | ||
| 716 | |||
| 717 | /* | ||
| 718 | * Without board specific bus width settings we support only the | ||
| 719 | * sensors native bus width witch are tested working | ||
| 720 | */ | ||
| 721 | if (width_flag & (SOCAM_DATAWIDTH_10 | SOCAM_DATAWIDTH_8)) | ||
| 722 | return 0; | ||
| 723 | |||
| 724 | return 0; | ||
| 725 | } | ||
| 726 | |||
| 727 | static unsigned long ov2640_query_bus_param(struct soc_camera_device *icd) | ||
| 728 | { | ||
| 729 | struct soc_camera_link *icl = to_soc_camera_link(icd); | ||
| 730 | unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER | | ||
| 731 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH | | ||
| 732 | SOCAM_DATA_ACTIVE_HIGH; | ||
| 733 | |||
| 734 | if (icl->query_bus_param) | ||
| 735 | flags |= icl->query_bus_param(icl) & SOCAM_DATAWIDTH_MASK; | ||
| 736 | else | ||
| 737 | flags |= SOCAM_DATAWIDTH_10; | ||
| 738 | |||
| 739 | return soc_camera_apply_sensor_flags(icl, flags); | ||
| 740 | } | ||
| 741 | |||
| 742 | static int ov2640_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | 704 | static int ov2640_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) |
| 743 | { | 705 | { |
| 744 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 706 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
| @@ -1067,8 +1029,6 @@ err: | |||
| 1067 | } | 1029 | } |
| 1068 | 1030 | ||
| 1069 | static struct soc_camera_ops ov2640_ops = { | 1031 | static struct soc_camera_ops ov2640_ops = { |
| 1070 | .set_bus_param = ov2640_set_bus_param, | ||
| 1071 | .query_bus_param = ov2640_query_bus_param, | ||
| 1072 | .controls = ov2640_controls, | 1032 | .controls = ov2640_controls, |
| 1073 | .num_controls = ARRAY_SIZE(ov2640_controls), | 1033 | .num_controls = ARRAY_SIZE(ov2640_controls), |
| 1074 | }; | 1034 | }; |
