| .. | .. |
|---|
| 127 | 127 | |
|---|
| 128 | 128 | #define IMX378_NUM_SUPPLIES ARRAY_SIZE(imx378_supply_names) |
|---|
| 129 | 129 | |
|---|
| 130 | | -enum imx378_max_pad { |
|---|
| 131 | | - PAD0, /* link to isp */ |
|---|
| 132 | | - PAD1, /* link to csi wr0 | hdr x2:L x3:M */ |
|---|
| 133 | | - PAD2, /* link to csi wr1 | hdr x3:L */ |
|---|
| 134 | | - PAD3, /* link to csi wr2 | hdr x2:M x3:S */ |
|---|
| 135 | | - PAD_MAX, |
|---|
| 136 | | -}; |
|---|
| 137 | | - |
|---|
| 138 | 130 | struct regval { |
|---|
| 139 | 131 | u16 addr; |
|---|
| 140 | 132 | u8 val; |
|---|
| .. | .. |
|---|
| 2091 | 2083 | struct imx378 *imx378 = to_imx378(sd); |
|---|
| 2092 | 2084 | const struct imx378_mode *mode = imx378->cur_mode; |
|---|
| 2093 | 2085 | |
|---|
| 2094 | | - mutex_lock(&imx378->mutex); |
|---|
| 2095 | 2086 | fi->interval = mode->max_fps; |
|---|
| 2096 | | - mutex_unlock(&imx378->mutex); |
|---|
| 2097 | 2087 | |
|---|
| 2098 | 2088 | return 0; |
|---|
| 2099 | 2089 | } |
|---|
| 2100 | 2090 | |
|---|
| 2101 | | -static int imx378_g_mbus_config(struct v4l2_subdev *sd, |
|---|
| 2091 | +static int imx378_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, |
|---|
| 2102 | 2092 | struct v4l2_mbus_config *config) |
|---|
| 2103 | 2093 | { |
|---|
| 2104 | 2094 | struct imx378 *imx378 = to_imx378(sd); |
|---|
| .. | .. |
|---|
| 2116 | 2106 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK | |
|---|
| 2117 | 2107 | V4L2_MBUS_CSI2_CHANNEL_1; |
|---|
| 2118 | 2108 | |
|---|
| 2119 | | - config->type = V4L2_MBUS_CSI2; |
|---|
| 2109 | + config->type = V4L2_MBUS_CSI2_DPHY; |
|---|
| 2120 | 2110 | config->flags = val; |
|---|
| 2121 | 2111 | |
|---|
| 2122 | 2112 | return 0; |
|---|
| .. | .. |
|---|
| 2570 | 2560 | static const struct v4l2_subdev_video_ops imx378_video_ops = { |
|---|
| 2571 | 2561 | .s_stream = imx378_s_stream, |
|---|
| 2572 | 2562 | .g_frame_interval = imx378_g_frame_interval, |
|---|
| 2573 | | - .g_mbus_config = imx378_g_mbus_config, |
|---|
| 2574 | 2563 | }; |
|---|
| 2575 | 2564 | |
|---|
| 2576 | 2565 | static const struct v4l2_subdev_pad_ops imx378_pad_ops = { |
|---|
| .. | .. |
|---|
| 2579 | 2568 | .enum_frame_interval = imx378_enum_frame_interval, |
|---|
| 2580 | 2569 | .get_fmt = imx378_get_fmt, |
|---|
| 2581 | 2570 | .set_fmt = imx378_set_fmt, |
|---|
| 2571 | + .get_mbus_config = imx378_g_mbus_config, |
|---|
| 2582 | 2572 | }; |
|---|
| 2583 | 2573 | |
|---|
| 2584 | 2574 | static const struct v4l2_subdev_ops imx378_subdev_ops = { |
|---|