Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: i2c: imx290: Add exposure time control

Support configuring the exposure time, which is expressed as the
complement of the exposure time (frame period minus integration time).
The frame period is currently fixed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

authored by

Laurent Pinchart and committed by
Sakari Ailus
827c7e69 79d99ae8

+14 -2
+14 -2
drivers/media/i2c/imx290.c
··· 103 103 #define IMX290_PGCTRL_THRU BIT(1) 104 104 #define IMX290_PGCTRL_MODE(n) ((n) << 4) 105 105 106 + #define IMX290_VMAX_DEFAULT 1125 107 + 106 108 static const char * const imx290_supply_name[] = { 107 109 "vdda", 108 110 "vddd", ··· 178 176 179 177 static const struct imx290_regval imx290_global_init_settings[] = { 180 178 { IMX290_CTRL_07, IMX290_WINMODE_1080P }, 181 - { IMX290_VMAX, 1125 }, 179 + { IMX290_VMAX, IMX290_VMAX_DEFAULT }, 182 180 { IMX290_EXTCK_FREQ, 0x2520 }, 183 181 { IMX290_WINWV_OB, 12 }, 184 182 { IMX290_WINPH, 0 }, ··· 482 480 case V4L2_CID_GAIN: 483 481 ret = imx290_write(imx290, IMX290_GAIN, ctrl->val, NULL); 484 482 break; 483 + 484 + case V4L2_CID_EXPOSURE: 485 + ret = imx290_write(imx290, IMX290_SHS1, 486 + IMX290_VMAX_DEFAULT - ctrl->val - 1, NULL); 487 + break; 488 + 485 489 case V4L2_CID_TEST_PATTERN: 486 490 if (ctrl->val) { 487 491 imx290_write(imx290, IMX290_BLKLEVEL, 0, &ret); ··· 1016 1008 */ 1017 1009 imx290_entity_init_cfg(&imx290->sd, NULL); 1018 1010 1019 - v4l2_ctrl_handler_init(&imx290->ctrls, 4); 1011 + v4l2_ctrl_handler_init(&imx290->ctrls, 5); 1020 1012 imx290->ctrls.lock = &imx290->lock; 1021 1013 1022 1014 v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops, 1023 1015 V4L2_CID_GAIN, 0, 72, 1, 0); 1016 + 1017 + v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops, 1018 + V4L2_CID_EXPOSURE, 1, IMX290_VMAX_DEFAULT - 2, 1, 1019 + IMX290_VMAX_DEFAULT - 2); 1024 1020 1025 1021 imx290->link_freq = 1026 1022 v4l2_ctrl_new_int_menu(&imx290->ctrls, &imx290_ctrl_ops,