.. | .. |
---|
2131 | 2131 | struct ov8858 *ov8858 = to_ov8858(sd); |
---|
2132 | 2132 | const struct ov8858_mode *mode = ov8858->cur_mode; |
---|
2133 | 2133 | |
---|
2134 | | - mutex_lock(&ov8858->mutex); |
---|
2135 | 2134 | fi->interval = mode->max_fps; |
---|
2136 | | - mutex_unlock(&ov8858->mutex); |
---|
2137 | 2135 | |
---|
2138 | 2136 | return 0; |
---|
2139 | 2137 | } |
---|
.. | .. |
---|
2803 | 2801 | regulator_bulk_disable(OV8858_NUM_SUPPLIES, ov8858->supplies); |
---|
2804 | 2802 | } |
---|
2805 | 2803 | |
---|
2806 | | -static int ov8858_runtime_resume(struct device *dev) |
---|
| 2804 | +static int __maybe_unused ov8858_runtime_resume(struct device *dev) |
---|
2807 | 2805 | { |
---|
2808 | 2806 | struct i2c_client *client = to_i2c_client(dev); |
---|
2809 | 2807 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
---|
.. | .. |
---|
2812 | 2810 | return __ov8858_power_on(ov8858); |
---|
2813 | 2811 | } |
---|
2814 | 2812 | |
---|
2815 | | -static int ov8858_runtime_suspend(struct device *dev) |
---|
| 2813 | +static int __maybe_unused ov8858_runtime_suspend(struct device *dev) |
---|
2816 | 2814 | { |
---|
2817 | 2815 | struct i2c_client *client = to_i2c_client(dev); |
---|
2818 | 2816 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
---|
.. | .. |
---|
2854 | 2852 | if (fie->index >= ov8858->cfg_num) |
---|
2855 | 2853 | return -EINVAL; |
---|
2856 | 2854 | |
---|
2857 | | - if (fie->code != OV8858_MEDIA_BUS_FMT) |
---|
2858 | | - return -EINVAL; |
---|
2859 | | - |
---|
| 2855 | + fie->code = OV8858_MEDIA_BUS_FMT; |
---|
2860 | 2856 | fie->width = supported_modes[fie->index].width; |
---|
2861 | 2857 | fie->height = supported_modes[fie->index].height; |
---|
2862 | 2858 | fie->interval = supported_modes[fie->index].max_fps; |
---|
2863 | 2859 | return 0; |
---|
2864 | 2860 | } |
---|
2865 | 2861 | |
---|
2866 | | -static int ov8858_g_mbus_config(struct v4l2_subdev *sd, |
---|
| 2862 | +static int ov8858_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, |
---|
2867 | 2863 | struct v4l2_mbus_config *config) |
---|
2868 | 2864 | { |
---|
2869 | 2865 | struct ov8858 *sensor = to_ov8858 (sd); |
---|
.. | .. |
---|
2872 | 2868 | dev_info(dev, "%s(%d) enter!\n", __func__, __LINE__); |
---|
2873 | 2869 | |
---|
2874 | 2870 | if (2 == sensor->lane_num) { |
---|
2875 | | - config->type = V4L2_MBUS_CSI2; |
---|
| 2871 | + config->type = V4L2_MBUS_CSI2_DPHY; |
---|
2876 | 2872 | config->flags = V4L2_MBUS_CSI2_2_LANE | |
---|
2877 | 2873 | V4L2_MBUS_CSI2_CHANNEL_0 | |
---|
2878 | 2874 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; |
---|
2879 | 2875 | } else if (4 == sensor->lane_num) { |
---|
2880 | | - config->type = V4L2_MBUS_CSI2; |
---|
| 2876 | + config->type = V4L2_MBUS_CSI2_DPHY; |
---|
2881 | 2877 | config->flags = V4L2_MBUS_CSI2_4_LANE | |
---|
2882 | 2878 | V4L2_MBUS_CSI2_CHANNEL_0 | |
---|
2883 | 2879 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; |
---|
.. | .. |
---|
2910 | 2906 | static const struct v4l2_subdev_video_ops ov8858_video_ops = { |
---|
2911 | 2907 | .s_stream = ov8858_s_stream, |
---|
2912 | 2908 | .g_frame_interval = ov8858_g_frame_interval, |
---|
2913 | | - .g_mbus_config = ov8858_g_mbus_config, |
---|
2914 | 2909 | }; |
---|
2915 | 2910 | |
---|
2916 | 2911 | static const struct v4l2_subdev_pad_ops ov8858_pad_ops = { |
---|
.. | .. |
---|
2919 | 2914 | .enum_frame_interval = ov8858_enum_frame_interval, |
---|
2920 | 2915 | .get_fmt = ov8858_get_fmt, |
---|
2921 | 2916 | .set_fmt = ov8858_set_fmt, |
---|
| 2917 | + .get_mbus_config = ov8858_g_mbus_config, |
---|
2922 | 2918 | }; |
---|
2923 | 2919 | |
---|
2924 | 2920 | static const struct v4l2_subdev_ops ov8858_subdev_ops = { |
---|