From: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Jai Luthra <jai.luthra@ideasonboard.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Jacopo Mondi <jacopo@jmondi.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Naushir Patuck <naush@raspberrypi.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
David Plowman <david.plowman@raspberrypi.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Peter Robinson <pbrobinson@gmail.com>,
Stefan Wahren <wahrenst@gmx.net>,
"Ivan T. Ivanov" <iivanov@suse.de>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Subject: Re: [PATCH v2 15/16] media: i2c: ov5647: Tidy up PIXEL_RATE control
Date: Mon, 1 Dec 2025 18:14:47 +0000 [thread overview]
Message-ID: <CAPY8ntCGnTNk4Bk5+QRV45jD7nfqZOToZ260YwfbvTQEJR7DFw@mail.gmail.com> (raw)
In-Reply-To: <20251118-b4-rpi-ov5647-v2-15-5e78e7cb7f9b@ideasonboard.com>
Hi Jai
On Tue, 18 Nov 2025 at 12:04, Jai Luthra <jai.luthra@ideasonboard.com> wrote:
>
> The pixel rate control is marked as read-only by the framework itself,
> so no need to mark it explicitly in the driver. Also, we can set the ops
> to NULL to avoid checking for it in the s_ctrl implementation.
>
> Suggested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
> drivers/media/i2c/ov5647.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
> index 3a2c25a6b6808bf1289a2357ac5b79bf6bf99daa..71107d74f2900b39233a52b29a229282bd087963 100644
> --- a/drivers/media/i2c/ov5647.c
> +++ b/drivers/media/i2c/ov5647.c
> @@ -1195,12 +1195,6 @@ static int ov5647_s_ctrl(struct v4l2_ctrl *ctrl)
> ret = ov5647_write(sd, OV5647_REG_ISPCTRL3D,
> ov5647_test_pattern_val[ctrl->val]);
> break;
> -
> - /* Read-only, but we adjust it based on mode. */
> - case V4L2_CID_PIXEL_RATE:
> - /* Read-only, but we adjust it based on mode. */
> - break;
> -
> case V4L2_CID_HFLIP:
> /* There's an in-built hflip in the sensor, so account for that here. */
> ov5647_s_flip(sd, OV5647_REG_TIMING_TC_H, !ctrl->val);
> @@ -1267,7 +1261,7 @@ static int ov5647_init_controls(struct ov5647 *sensor)
> V4L2_CID_ANALOGUE_GAIN, 16, 1023, 1, 32);
>
> /* By default, PIXEL_RATE is read only, but it does change per mode */
> - sensor->pixel_rate = v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops,
> + sensor->pixel_rate = v4l2_ctrl_new_std(&sensor->ctrls, NULL,
> V4L2_CID_PIXEL_RATE,
> sensor->mode->pixel_rate,
> sensor->mode->pixel_rate, 1,
> @@ -1306,7 +1300,6 @@ static int ov5647_init_controls(struct ov5647 *sensor)
> if (sensor->ctrls.error)
> goto handler_free;
>
> - sensor->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
> sensor->sd.ctrl_handler = &sensor->ctrls;
>
> return 0;
>
> --
> 2.51.1
>
next prev parent reply other threads:[~2025-12-01 18:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 12:02 [PATCH v2 00/16] media: i2c: Miscellaneous features and fixes for OV5647 Jai Luthra
2025-11-18 12:02 ` [PATCH v2 01/16] media: i2c: ov5647: Initialize subdev before controls Jai Luthra
2025-11-18 12:02 ` [PATCH v2 02/16] media: i2c: ov5647: Correct pixel array offset Jai Luthra
2025-11-18 12:02 ` [PATCH v2 03/16] media: i2c: ov5647: Correct minimum VBLANK value Jai Luthra
2025-11-18 12:02 ` [PATCH v2 04/16] media: i2c: ov5647: Sensor should report RAW color space Jai Luthra
2025-11-18 12:02 ` [PATCH v2 05/16] dt-bindings: media: ov5647: Add optional regulators Jai Luthra
2025-11-19 6:57 ` Krzysztof Kozlowski
2025-11-18 12:02 ` [PATCH v2 06/16] media: i2c: ov5647: Add support for regulator control Jai Luthra
2025-12-01 14:59 ` Jacopo Mondi
2025-11-18 12:03 ` [PATCH v2 07/16] dt-bindings: media: ov5647: Allow props from video-interface-devices Jai Luthra
2025-11-19 6:58 ` Krzysztof Kozlowski
2025-11-18 12:03 ` [PATCH v2 08/16] media: i2c: ov5647: Parse and register properties Jai Luthra
2025-12-01 14:55 ` Jacopo Mondi
2025-11-18 12:03 ` [PATCH v2 09/16] media: i2c: ov5647: Support HFLIP and VFLIP Jai Luthra
2025-12-01 15:15 ` Jacopo Mondi
2025-12-03 6:41 ` Jai Luthra
2025-11-18 12:03 ` [PATCH v2 10/16] media: i2c: ov5647: Use v4l2_async_register_subdev_sensor for lens binding Jai Luthra
2025-11-18 12:03 ` [PATCH v2 11/16] media: i2c: ov5647: Add control of V4L2_CID_HBLANK Jai Luthra
2025-12-01 15:18 ` Jacopo Mondi
2025-11-18 12:03 ` [PATCH v2 12/16] media: i2c: ov5647: Tidy up mode registers to make the order common Jai Luthra
2025-11-18 12:03 ` [PATCH v2 13/16] media: i2c: ov5647: Separate out the common registers Jai Luthra
2025-11-18 12:03 ` [PATCH v2 14/16] media: i2c: ov5647: Use the same PLL config for full, 1080p, and binned modes Jai Luthra
2025-11-18 12:03 ` [PATCH v2 15/16] media: i2c: ov5647: Tidy up PIXEL_RATE control Jai Luthra
2025-12-01 15:36 ` Jacopo Mondi
2025-12-01 18:14 ` Dave Stevenson [this message]
2025-11-18 12:03 ` [PATCH v2 16/16] media: i2c: ov5647: Add V4L2_CID_LINK_FREQUENCY control Jai Luthra
2025-12-01 15:50 ` Jacopo Mondi
2025-12-03 6:47 ` Jai Luthra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPY8ntCGnTNk4Bk5+QRV45jD7nfqZOToZ260YwfbvTQEJR7DFw@mail.gmail.com \
--to=dave.stevenson@raspberrypi.com \
--cc=conor+dt@kernel.org \
--cc=david.plowman@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=iivanov@suse.de \
--cc=jacopo.mondi@ideasonboard.com \
--cc=jacopo@jmondi.org \
--cc=jai.luthra@ideasonboard.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=naush@raspberrypi.com \
--cc=pbrobinson@gmail.com \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=wahrenst@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).