lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YPp2X71VoMV4O+io@aptenodytes>
Date:   Fri, 23 Jul 2021 09:57:19 +0200
From:   Paul Kocialkowski <paul.kocialkowski@...tlin.com>
To:     Daniel Scally <djrscally@...il.com>
Cc:     Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Ezequiel Garcia <ezequiel@...labora.com>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Yang Li <yang.lee@...ux.alibaba.com>,
        "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)" 
        <linux-media@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Yong Zhi <yong.zhi@...el.com>,
        Bingbu Cao <bingbu.cao@...el.com>,
        Tianshu Qiu <tian.shu.qiu@...el.com>,
        Colin Ian King <colin.king@...onical.com>,
        laurent.pinchart@...asonboard.com, kieran.bingham@...asonboard.com
Subject: Re: [PATCH 06/13] media: i2c: Switch control to
 V4L2_CID_ANALOGUE_GAIN

Hi,

On Thu 22 Jul 21, 21:34, Daniel Scally wrote:
> The V4L2_CID_GAIN control for this driver configures registers that
> the datasheet specifies as analogue gain. Switch the control's ID
> to V4L2_CID_ANALOGUE_GAIN.

I had some doubts about this when writing the driver because it's called
"AEC gain" but it seems that you're right. The datasheet also defines
0x350a and 0x350b as digital gain (which are unused by the driver).

This is:
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@...tlin.com>

Cheers,

Paul

> Signed-off-by: Daniel Scally <djrscally@...il.com>
> ---
>  drivers/media/i2c/ov8865.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c
> index c012f5cb11ab..09558a3342dd 100644
> --- a/drivers/media/i2c/ov8865.c
> +++ b/drivers/media/i2c/ov8865.c
> @@ -2137,7 +2137,7 @@ static int ov8865_exposure_configure(struct ov8865_sensor *sensor, u32 exposure)
>  
>  /* Gain */
>  
> -static int ov8865_gain_configure(struct ov8865_sensor *sensor, u32 gain)
> +static int ov8865_analog_gain_configure(struct ov8865_sensor *sensor, u32 gain)
>  {
>  	int ret;
>  
> @@ -2447,8 +2447,8 @@ static int ov8865_s_ctrl(struct v4l2_ctrl *ctrl)
>  		if (ret)
>  			return ret;
>  		break;
> -	case V4L2_CID_GAIN:
> -		ret = ov8865_gain_configure(sensor, ctrl->val);
> +	case V4L2_CID_ANALOGUE_GAIN:
> +		ret = ov8865_analog_gain_configure(sensor, ctrl->val);
>  		if (ret)
>  			return ret;
>  		break;
> @@ -2493,7 +2493,7 @@ static int ov8865_ctrls_init(struct ov8865_sensor *sensor)
>  
>  	/* Gain */
>  
> -	v4l2_ctrl_new_std(handler, ops, V4L2_CID_GAIN, 128, 8191, 128, 128);
> +	v4l2_ctrl_new_std(handler, ops, V4L2_CID_ANALOGUE_GAIN, 128, 8191, 128, 128);
>  
>  	/* White Balance */
>  
> -- 
> 2.25.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ