| .. | .. |
|---|
| 137 | 137 | |
|---|
| 138 | 138 | #define IMX334_NUM_SUPPLIES ARRAY_SIZE(imx334_supply_names) |
|---|
| 139 | 139 | |
|---|
| 140 | | -enum imx334_max_pad { |
|---|
| 141 | | - PAD0, /* link to isp */ |
|---|
| 142 | | - PAD1, /* link to csi wr0 | hdr x2:L x3:M */ |
|---|
| 143 | | - PAD2, /* link to csi wr1 | hdr x3:L */ |
|---|
| 144 | | - PAD3, /* link to csi wr2 | hdr x2:M x3:S */ |
|---|
| 145 | | - PAD_MAX, |
|---|
| 146 | | -}; |
|---|
| 147 | | - |
|---|
| 148 | 140 | struct regval { |
|---|
| 149 | 141 | u16 addr; |
|---|
| 150 | 142 | u8 val; |
|---|
| .. | .. |
|---|
| 851 | 843 | struct imx334 *imx334 = to_imx334(sd); |
|---|
| 852 | 844 | const struct imx334_mode *mode = imx334->cur_mode; |
|---|
| 853 | 845 | |
|---|
| 854 | | - mutex_lock(&imx334->mutex); |
|---|
| 855 | 846 | fi->interval = mode->max_fps; |
|---|
| 856 | | - mutex_unlock(&imx334->mutex); |
|---|
| 857 | 847 | |
|---|
| 858 | 848 | return 0; |
|---|
| 859 | 849 | } |
|---|
| 860 | 850 | |
|---|
| 861 | | -static int imx334_g_mbus_config(struct v4l2_subdev *sd, |
|---|
| 851 | +static int imx334_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, |
|---|
| 862 | 852 | struct v4l2_mbus_config *config) |
|---|
| 863 | 853 | { |
|---|
| 864 | 854 | struct imx334 *imx334 = to_imx334(sd); |
|---|
| .. | .. |
|---|
| 870 | 860 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; |
|---|
| 871 | 861 | |
|---|
| 872 | 862 | config->flags = (mode->hdr_mode == NO_HDR) ? val : (val | V4L2_MBUS_CSI2_CHANNEL_1); |
|---|
| 873 | | - config->type = V4L2_MBUS_CSI2; |
|---|
| 863 | + config->type = V4L2_MBUS_CSI2_DPHY; |
|---|
| 874 | 864 | return 0; |
|---|
| 875 | 865 | } |
|---|
| 876 | 866 | |
|---|
| .. | .. |
|---|
| 1474 | 1464 | static const struct v4l2_subdev_video_ops imx334_video_ops = { |
|---|
| 1475 | 1465 | .s_stream = imx334_s_stream, |
|---|
| 1476 | 1466 | .g_frame_interval = imx334_g_frame_interval, |
|---|
| 1477 | | - .g_mbus_config = imx334_g_mbus_config, |
|---|
| 1478 | 1467 | }; |
|---|
| 1479 | 1468 | |
|---|
| 1480 | 1469 | static const struct v4l2_subdev_pad_ops imx334_pad_ops = { |
|---|
| .. | .. |
|---|
| 1484 | 1473 | .get_fmt = imx334_get_fmt, |
|---|
| 1485 | 1474 | .set_fmt = imx334_set_fmt, |
|---|
| 1486 | 1475 | .get_selection = imx334_get_selection, |
|---|
| 1476 | + .get_mbus_config = imx334_g_mbus_config, |
|---|
| 1487 | 1477 | }; |
|---|
| 1488 | 1478 | |
|---|
| 1489 | 1479 | static const struct v4l2_subdev_ops imx334_subdev_ops = { |
|---|