media: i2c: imx335 add hdr_mode in enum frame interval

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I0e5b73a7ad167d270729b484a7203a20ddfe493d
This commit is contained in:
Yiqing Zeng
2020-10-12 22:04:36 +08:00
committed by Tao Huang
parent ecf8977f0b
commit a9b8a1ef99

View File

@@ -7,6 +7,7 @@
* V0.0X01.0X00 first version
* V0.0X01.0X01 support 10bit DOL3
* V0.0X01.0X02 fix set sensor vertical invert failed
* V0.0X01.0X03 add hdr_mode in enum frame interval
*/
#define DEBUG
@@ -29,7 +30,7 @@
#include <linux/pinctrl/consumer.h>
#include <linux/rk-preisp.h>
#define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x02)
#define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x03)
#ifndef V4L2_CID_DIGITAL_GAIN
#define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN
@@ -1589,12 +1590,11 @@ static int imx335_enum_frame_interval(struct v4l2_subdev *sd,
if (fie->index >= imx335->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;
}