lkml.org 
[lkml]   [2019]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 5/5] media: ov7670: split register setting from set_framerate() logic
On Tue, Jan 15, 2019 at 09:54:48AM +0100, Lubomir Rintel wrote:
> This will allow us to restore the last set frame rate after the device
> returns from a power off.
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

Thanks!

I've applied them, and hopefully all is well now.

> ---
> drivers/media/i2c/ov7670.c | 26 ++++++++++++++------------
> 1 file changed, 14 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
> index d0f40d5f6ca0..6f9a53d4dcfc 100644
> --- a/drivers/media/i2c/ov7670.c
> +++ b/drivers/media/i2c/ov7670.c
> @@ -812,13 +812,24 @@ static void ov7675_get_framerate(struct v4l2_subdev *sd,
> (4 * clkrc);
> }
>
> +static int ov7675_apply_framerate(struct v4l2_subdev *sd)
> +{
> + struct ov7670_info *info = to_state(sd);
> + int ret;
> +
> + ret = ov7670_write(sd, REG_CLKRC, info->clkrc);
> + if (ret < 0)
> + return ret;
> +
> + return ov7670_write(sd, REG_DBLV, info->pll_bypass ? DBLV_BYPASS : DBLV_X4);

I wrapped this to avoid it exceeding 80... no other changes.

> +}

--
Sakari Ailus

\
 
 \ /
  Last update: 2019-01-15 10:11    [W:0.070 / U:18.436 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site