media: i2c: imx415 support enum format by aiq

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib4163057e718ca832a156a44f448c110c99e7d17
This commit is contained in:
Zefa Chen
2020-08-24 15:08:08 +08:00
committed by Tao Huang
parent 05c86e9eef
commit 73a31cda08

View File

@@ -16,6 +16,8 @@
* V0.0X01.0X03
* 1. support 12bit HDR DOL3
* 2. support HDR/Linear quick switch
* V0.0X01.0X04
* 1. support enum format info by aiq
*/
#define DEBUG
@@ -38,7 +40,7 @@
#include <linux/pinctrl/consumer.h>
#include <linux/rk-preisp.h>
#define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x03)
#define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x04)
#ifndef V4L2_CID_DIGITAL_GAIN
#define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN
@@ -1705,12 +1707,11 @@ static int imx415_enum_frame_interval(struct v4l2_subdev *sd,
if (fie->index >= imx415->cfg_num)
return -EINVAL;
if (fie->code != supported_modes[fie->index].bus_fmt)
return -EINVAL;
fie->code = supported_modes[fie->index].bus_fmt;
fie->width = supported_modes[fie->index].width;
fie->height = supported_modes[fie->index].height;
fie->interval = supported_modes[fie->index].max_fps;
fie->reserved[0] = supported_modes[fie->index].hdr_mode;
return 0;
}