.. | .. |
---|
443 | 443 | struct gc2385 *gc2385 = to_gc2385(sd); |
---|
444 | 444 | const struct gc2385_mode *mode = gc2385->cur_mode; |
---|
445 | 445 | |
---|
446 | | - mutex_lock(&gc2385->mutex); |
---|
447 | 446 | fi->interval = mode->max_fps; |
---|
448 | | - mutex_unlock(&gc2385->mutex); |
---|
449 | 447 | |
---|
450 | 448 | return 0; |
---|
451 | 449 | } |
---|
.. | .. |
---|
729 | 727 | regulator_bulk_disable(GC2385_NUM_SUPPLIES, gc2385->supplies); |
---|
730 | 728 | } |
---|
731 | 729 | |
---|
732 | | -static int gc2385_runtime_resume(struct device *dev) |
---|
| 730 | +static int __maybe_unused gc2385_runtime_resume(struct device *dev) |
---|
733 | 731 | { |
---|
734 | 732 | struct i2c_client *client = to_i2c_client(dev); |
---|
735 | 733 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
---|
.. | .. |
---|
738 | 736 | return __gc2385_power_on(gc2385); |
---|
739 | 737 | } |
---|
740 | 738 | |
---|
741 | | -static int gc2385_runtime_suspend(struct device *dev) |
---|
| 739 | +static int __maybe_unused gc2385_runtime_suspend(struct device *dev) |
---|
742 | 740 | { |
---|
743 | 741 | struct i2c_client *client = to_i2c_client(dev); |
---|
744 | 742 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
---|
.. | .. |
---|
778 | 776 | if (fie->index >= ARRAY_SIZE(supported_modes)) |
---|
779 | 777 | return -EINVAL; |
---|
780 | 778 | |
---|
781 | | - if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10) |
---|
782 | | - return -EINVAL; |
---|
783 | | - |
---|
| 779 | + fie->code = MEDIA_BUS_FMT_SBGGR10_1X10; |
---|
784 | 780 | fie->width = supported_modes[fie->index].width; |
---|
785 | 781 | fie->height = supported_modes[fie->index].height; |
---|
786 | 782 | fie->interval = supported_modes[fie->index].max_fps; |
---|
787 | 783 | return 0; |
---|
788 | 784 | } |
---|
789 | 785 | |
---|
790 | | -static int gc2385_g_mbus_config(struct v4l2_subdev *sd, |
---|
| 786 | +static int gc2385_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, |
---|
791 | 787 | struct v4l2_mbus_config *config) |
---|
792 | 788 | { |
---|
793 | 789 | u32 val = 0; |
---|
.. | .. |
---|
795 | 791 | val = 1 << (GC2385_LANES - 1) | |
---|
796 | 792 | V4L2_MBUS_CSI2_CHANNEL_0 | |
---|
797 | 793 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; |
---|
798 | | - config->type = V4L2_MBUS_CSI2; |
---|
| 794 | + config->type = V4L2_MBUS_CSI2_DPHY; |
---|
799 | 795 | config->flags = val; |
---|
800 | 796 | |
---|
801 | 797 | return 0; |
---|
.. | .. |
---|
823 | 819 | static const struct v4l2_subdev_video_ops gc2385_video_ops = { |
---|
824 | 820 | .s_stream = gc2385_s_stream, |
---|
825 | 821 | .g_frame_interval = gc2385_g_frame_interval, |
---|
826 | | - .g_mbus_config = gc2385_g_mbus_config, |
---|
827 | 822 | }; |
---|
828 | 823 | |
---|
829 | 824 | static const struct v4l2_subdev_pad_ops gc2385_pad_ops = { |
---|
.. | .. |
---|
832 | 827 | .enum_frame_interval = gc2385_enum_frame_interval, |
---|
833 | 828 | .get_fmt = gc2385_get_fmt, |
---|
834 | 829 | .set_fmt = gc2385_set_fmt, |
---|
| 830 | + .get_mbus_config = gc2385_g_mbus_config, |
---|
835 | 831 | }; |
---|
836 | 832 | |
---|
837 | 833 | static const struct v4l2_subdev_ops gc2385_subdev_ops = { |
---|