.. | .. |
---|
43 | 43 | #endif |
---|
44 | 44 | |
---|
45 | 45 | /* pixel rate = link frequency * 2 * lanes / BITS_PER_SAMPLE */ |
---|
46 | | -#define MIPI_FREQ 360000000U |
---|
| 46 | +#define MIPI_FREQ 480000000U |
---|
47 | 47 | #define OS08A20_PIXEL_RATE (MIPI_FREQ * 2LL * 4LL / 10) |
---|
48 | 48 | #define OS08A20_XVCLK_FREQ 24000000 |
---|
49 | 49 | |
---|
.. | .. |
---|
684 | 684 | struct os08a20 *os08a20 = to_os08a20(sd); |
---|
685 | 685 | const struct os08a20_mode *mode = os08a20->cur_mode; |
---|
686 | 686 | |
---|
687 | | - mutex_lock(&os08a20->mutex); |
---|
688 | 687 | fi->interval = mode->max_fps; |
---|
689 | | - mutex_unlock(&os08a20->mutex); |
---|
690 | 688 | |
---|
691 | 689 | return 0; |
---|
692 | 690 | } |
---|
.. | .. |
---|
1107 | 1105 | if (fie->index >= os08a20->cfg_num) |
---|
1108 | 1106 | return -EINVAL; |
---|
1109 | 1107 | |
---|
1110 | | - if (fie->code != OS08A20_MEDIA_BUS_FMT) |
---|
1111 | | - return -EINVAL; |
---|
1112 | | - |
---|
| 1108 | + fie->code = OS08A20_MEDIA_BUS_FMT; |
---|
1113 | 1109 | fie->width = supported_modes[fie->index].width; |
---|
1114 | 1110 | fie->height = supported_modes[fie->index].height; |
---|
1115 | 1111 | fie->interval = supported_modes[fie->index].max_fps; |
---|
.. | .. |
---|
1118 | 1114 | } |
---|
1119 | 1115 | |
---|
1120 | 1116 | static int os08a20_g_mbus_config(struct v4l2_subdev *sd, |
---|
| 1117 | + unsigned int pad_id, |
---|
1121 | 1118 | struct v4l2_mbus_config *config) |
---|
1122 | 1119 | { |
---|
1123 | 1120 | u32 val = 0; |
---|
.. | .. |
---|
1125 | 1122 | val = 1 << (OS08A20_LANES - 1) | |
---|
1126 | 1123 | V4L2_MBUS_CSI2_CHANNEL_0 | |
---|
1127 | 1124 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; |
---|
1128 | | - config->type = V4L2_MBUS_CSI2; |
---|
| 1125 | + config->type = V4L2_MBUS_CSI2_DPHY; |
---|
1129 | 1126 | config->flags = val; |
---|
1130 | 1127 | |
---|
1131 | 1128 | return 0; |
---|
.. | .. |
---|
1153 | 1150 | static const struct v4l2_subdev_video_ops os08a20_video_ops = { |
---|
1154 | 1151 | .s_stream = os08a20_s_stream, |
---|
1155 | 1152 | .g_frame_interval = os08a20_g_frame_interval, |
---|
1156 | | - .g_mbus_config = os08a20_g_mbus_config, |
---|
1157 | 1153 | }; |
---|
1158 | 1154 | |
---|
1159 | 1155 | static const struct v4l2_subdev_pad_ops os08a20_pad_ops = { |
---|
.. | .. |
---|
1162 | 1158 | .enum_frame_interval = os08a20_enum_frame_interval, |
---|
1163 | 1159 | .get_fmt = os08a20_get_fmt, |
---|
1164 | 1160 | .set_fmt = os08a20_set_fmt, |
---|
| 1161 | + .get_mbus_config = os08a20_g_mbus_config, |
---|
1165 | 1162 | }; |
---|
1166 | 1163 | |
---|
1167 | 1164 | static const struct v4l2_subdev_ops os08a20_subdev_ops = { |
---|
.. | .. |
---|
1606 | 1603 | module_exit(sensor_mod_exit); |
---|
1607 | 1604 | |
---|
1608 | 1605 | MODULE_DESCRIPTION("OmniVision os08a20 sensor driver"); |
---|
1609 | | -MODULE_LICENSE("GPL v2"); |
---|
| 1606 | +MODULE_LICENSE("GPL"); |
---|