lkml.org 
[lkml]   [2020]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 06/10] media: i2c: imx290: Add support for test pattern generation
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

\
 
 \ /
  Last update: 2020-06-23 14:26    [W:0.084 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site