.. | .. |
---|
544 | 544 | struct gc5025 *gc5025 = to_gc5025(sd); |
---|
545 | 545 | const struct gc5025_mode *mode = gc5025->cur_mode; |
---|
546 | 546 | |
---|
547 | | - mutex_lock(&gc5025->mutex); |
---|
548 | 547 | fi->interval = mode->max_fps; |
---|
549 | | - mutex_unlock(&gc5025->mutex); |
---|
550 | 548 | |
---|
551 | 549 | return 0; |
---|
552 | 550 | } |
---|
.. | .. |
---|
1502 | 1500 | if (fie->index >= ARRAY_SIZE(supported_modes)) |
---|
1503 | 1501 | return -EINVAL; |
---|
1504 | 1502 | |
---|
1505 | | - if (fie->code != MEDIA_BUS_FMT_SRGGB10_1X10) |
---|
1506 | | - return -EINVAL; |
---|
1507 | | - |
---|
| 1503 | + fie->code = MEDIA_BUS_FMT_SRGGB10_1X10; |
---|
1508 | 1504 | fie->width = supported_modes[fie->index].width; |
---|
1509 | 1505 | fie->height = supported_modes[fie->index].height; |
---|
1510 | 1506 | fie->interval = supported_modes[fie->index].max_fps; |
---|
1511 | 1507 | return 0; |
---|
1512 | 1508 | } |
---|
1513 | 1509 | |
---|
1514 | | -static int gc5025_g_mbus_config(struct v4l2_subdev *sd, |
---|
| 1510 | +static int gc5025_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, |
---|
1515 | 1511 | struct v4l2_mbus_config *config) |
---|
1516 | 1512 | { |
---|
1517 | 1513 | u32 val = 0; |
---|
.. | .. |
---|
1520 | 1516 | V4L2_MBUS_CSI2_CHANNEL_0 | |
---|
1521 | 1517 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; |
---|
1522 | 1518 | |
---|
1523 | | - config->type = V4L2_MBUS_CSI2; |
---|
| 1519 | + config->type = V4L2_MBUS_CSI2_DPHY; |
---|
1524 | 1520 | config->flags = val; |
---|
1525 | 1521 | |
---|
1526 | 1522 | return 0; |
---|
.. | .. |
---|
1563 | 1559 | static const struct v4l2_subdev_video_ops gc5025_video_ops = { |
---|
1564 | 1560 | .s_stream = gc5025_s_stream, |
---|
1565 | 1561 | .g_frame_interval = gc5025_g_frame_interval, |
---|
1566 | | - .g_mbus_config = gc5025_g_mbus_config, |
---|
1567 | 1562 | }; |
---|
1568 | 1563 | |
---|
1569 | 1564 | static const struct v4l2_subdev_pad_ops gc5025_pad_ops = { |
---|
.. | .. |
---|
1573 | 1568 | .get_fmt = gc5025_get_fmt, |
---|
1574 | 1569 | .set_fmt = gc5025_set_fmt, |
---|
1575 | 1570 | .get_selection = gc5025_get_selection, |
---|
| 1571 | + .get_mbus_config = gc5025_g_mbus_config, |
---|
1576 | 1572 | }; |
---|
1577 | 1573 | |
---|
1578 | 1574 | static const struct v4l2_subdev_ops gc5025_subdev_ops = { |
---|