Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1158712pxv; Fri, 23 Jul 2021 00:58:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUgjfTpdNI1ia6sD7F4L/oG3QP/mCDhHLJj4NK/1sJ6PmFJmooYtZ7eW8ueukDb3g1HGqq X-Received: by 2002:a5d:928f:: with SMTP id s15mr3036243iom.142.1627027105347; Fri, 23 Jul 2021 00:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627027105; cv=none; d=google.com; s=arc-20160816; b=DsAiX5F3UROQBqAe3MiSkumLyF8jn1ZD1/r0DkZknwDtPPp85O96pIf9aO3JaXpSSx tWAqdxYg/1/GpnUhIGF2lu7zPdY61MJKGVOELfq7R5W3UrD/y3jnAe0bqcvOqNMcYJeF +VhHvXtgGY5SgYOGdUsspCyYQanorLayymZn7g3MGBmfe9c3gQHD5Ns4O4BFy2gSEnCS W6KKcE3MgjKs0XZq4m1qEIz+T63KUTfGX2/sjzzMY/oWQBQgdZ2EnF21obSFOdFlaBrB ia1JbTOQ4VYp652bG5zCvsmhXDv4er8tMRSXRZP/S5/IbZyt5xg59hgJ2tHOJ9/infUi lLFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Ka1XeiDScLqTk04TimxSSzqHVdJrkbM+GNgKxjdDgK0=; b=Xt0kTQ3+4W6aUgaQDHBRsP5vJw0sOb501chdjZHmalmhM2NVF7LX/FjQD5NXlZghTe N5SJDEk+LH1TGhxj8lYdpY5Ja6IZBrHRLq09M264l4ehphbbqsGgxCh/bkq/zC42r7y9 kYK1mFBK8Kjja/p98V4WYYNHAc23goj8wPCf04lxraP0AO3JpND4r3rSuAHiNbln38rN 5eAtBsEjpSqLty9aVyJ8Al9LWY5UVQhvdq6a7Qc93ZqCMjgvbDJrlpDbrxx38L0F92Cg jcFqMHrxzyS1Tv6wGNprPN+fdSoU8qC30MjKb3c2Y8jvkMppoL9vNp/WcV88q9BQeoZ3 /YKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si31250103ils.118.2021.07.23.00.58.14; Fri, 23 Jul 2021 00:58:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234190AbhGWHQs (ORCPT + 99 others); Fri, 23 Jul 2021 03:16:48 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:35801 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233291AbhGWHQs (ORCPT ); Fri, 23 Jul 2021 03:16:48 -0400 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 80AA040005; Fri, 23 Jul 2021 07:57:19 +0000 (UTC) Date: Fri, 23 Jul 2021 09:57:19 +0200 From: Paul Kocialkowski To: Daniel Scally Cc: Mauro Carvalho Chehab , Sakari Ailus , Ezequiel Garcia , Hans Verkuil , Yang Li , "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)" , open list , Yong Zhi , Bingbu Cao , Tianshu Qiu , Colin Ian King , laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com Subject: Re: [PATCH 06/13] media: i2c: Switch control to V4L2_CID_ANALOGUE_GAIN Message-ID: References: <20210722203407.3588046-1-djrscally@gmail.com> <20210722203407.3588046-7-djrscally@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GdqoQrFo9RXxs74D" Content-Disposition: inline In-Reply-To: <20210722203407.3588046-7-djrscally@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --GdqoQrFo9RXxs74D Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 Cheers, Paul > Signed-off-by: Daniel Scally > --- > drivers/media/i2c/ov8865.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > 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) > =20 > /* Gain */ > =20 > -static int ov8865_gain_configure(struct ov8865_sensor *sensor, u32 gain) > +static int ov8865_analog_gain_configure(struct ov8865_sensor *sensor, u3= 2 gain) > { > int ret; > =20 > @@ -2447,8 +2447,8 @@ static int ov8865_s_ctrl(struct v4l2_ctrl *ctrl) > if (ret) > return ret; > break; > - case V4L2_CID_GAIN: > - ret =3D ov8865_gain_configure(sensor, ctrl->val); > + case V4L2_CID_ANALOGUE_GAIN: > + ret =3D 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) > =20 > /* Gain */ > =20 > - 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); > =20 > /* White Balance */ > =20 > --=20 > 2.25.1 >=20 --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --GdqoQrFo9RXxs74D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmD6dl8ACgkQ3cLmz3+f v9EqeggAhd74OeKQ9EfYhrxk87Xwbzv4vpC7IgT75yC2Wgtz7cXH1+ZwbrUlRMxS vUZGvrbKcaWZTskIsHSSZXyKDvfe3QzC4YSierJNGAQ1uoZa+db+dVrUqlBTXWE/ 8F70MBOdOjMkOkJpMYDZ/TN6vn/x1831rdEwYddjGxwK0Tv9YuNochPWYGTB6QPF 7NAsbzl216bim1hcq5lsku6sKqHEfMtOZ+gwRqhj8L5Nu6Zh6hFrSMJo7fwHxy3g HOWUiQhO96U1GD9XZr87m2CneWJ1OSKqmy6cobrYriG3iMv86pc204xV4kv+jzNV QYAOwbpDIIr53ANW2qv/HgVae3f18Q== =WUlq -----END PGP SIGNATURE----- --GdqoQrFo9RXxs74D--