struct v4l2_subdev_pad_config *cfg)
{
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
- struct i2c_client *client = v4l2_get_subdevdata(sd);
- struct ov2640_priv *priv = to_ov2640(client);
struct v4l2_mbus_framefmt *try_fmt =
v4l2_subdev_get_try_format(sd, cfg, 0);
+ const struct ov2640_win_size *win =
+ ov2640_select_win(SVGA_WIDTH, SVGA_HEIGHT);
- try_fmt->width = priv->win->width;
- try_fmt->height = priv->win->height;
- try_fmt->code = priv->cfmt_code;
+ try_fmt->width = win->width;
+ try_fmt->height = win->height;
+ try_fmt->code = MEDIA_BUS_FMT_UYVY8_2X8;
try_fmt->colorspace = V4L2_COLORSPACE_SRGB;
try_fmt->field = V4L2_FIELD_NONE;
try_fmt->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;