Commit 8e5652ae authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Mauro Carvalho Chehab

media: i2c: imx290: replace msleep(10) with usleep_range(10000, 11000)

This fixes checkpatch warnings of "msleep < 20ms can sleep for up to 20ms".
Signed-off-by: default avatarAndrey Konovalov <andrey.konovalov@linaro.org>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 8d4a696a
...@@ -406,7 +406,7 @@ static int imx290_set_register_array(struct imx290 *imx290, ...@@ -406,7 +406,7 @@ static int imx290_set_register_array(struct imx290 *imx290,
} }
/* Provide 10ms settle time */ /* Provide 10ms settle time */
msleep(10); usleep_range(10000, 11000);
return 0; return 0;
} }
...@@ -484,14 +484,14 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl) ...@@ -484,14 +484,14 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
if (ctrl->val) { if (ctrl->val) {
imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x00); imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x00);
imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00); imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00);
msleep(10); usleep_range(10000, 11000);
imx290_write_reg(imx290, IMX290_PGCTRL, imx290_write_reg(imx290, IMX290_PGCTRL,
(u8)(IMX290_PGCTRL_REGEN | (u8)(IMX290_PGCTRL_REGEN |
IMX290_PGCTRL_THRU | IMX290_PGCTRL_THRU |
IMX290_PGCTRL_MODE(ctrl->val))); IMX290_PGCTRL_MODE(ctrl->val)));
} else { } else {
imx290_write_reg(imx290, IMX290_PGCTRL, 0x00); imx290_write_reg(imx290, IMX290_PGCTRL, 0x00);
msleep(10); usleep_range(10000, 11000);
if (imx290->bpp == 10) if (imx290->bpp == 10)
imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW,
0x3c); 0x3c);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment