[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b7a32257-45ce-517f-ece1-63a27f768dc6@gmail.com>
Date: Fri, 23 Jul 2021 13:00:40 +0100
From: Daniel Scally <djrscally@...il.com>
To: Paul Kocialkowski <paul.kocialkowski@...tlin.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 Paul
On 23/07/2021 08:57, Paul Kocialkowski wrote:
> 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>
Thanks - yeah it took me a while to be sure too. Particularly confusing
because it's called "AEC gain" in a section headed "Manual exposure /
gain compensation"...they do like to make the datasheets clear as mud
sometimes.
>
> 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
>>
Powered by blists - more mailing lists