[PATCH v5 06/10] media: i2c: imx290: Add support for test pattern generation
Sakari Ailus
sakari.ailus at iki.fi
Tue Jun 23 08:25:36 EDT 2020
Hi Andrey,
On Fri, Jun 12, 2020 at 04:53:51PM +0300, Andrey Konovalov wrote:
...
> @@ -448,6 +466,22 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
> case V4L2_CID_GAIN:
> ret = imx290_set_gain(imx290, ctrl->val);
> break;
> + case V4L2_CID_TEST_PATTERN:
> + if (ctrl->val) {
> + imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x00);
> + imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00);
> + msleep(10);
> + imx290_write_reg(imx290, IMX290_PGCTRL,
> + (u8)(IMX290_PGCTRL_REGEN |
> + IMX290_PGCTRL_THRU |
> + IMX290_PGCTRL_MODE(ctrl->val)));
> + } else {
> + imx290_write_reg(imx290, IMX290_PGCTRL, 0x00);
> + msleep(10);
> + imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x3c);
> + imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00);
> + }
> + break;
> default:
> ret = -EINVAL;
> break;
I've merged the patches in my tree. Could you still replace msleep() with
less than 20 ms with usleep_range() usage as a follow-up patch on top of
these, please?
--
Kind regards,
Sakari Ailus
More information about the linux-arm-kernel
mailing list