public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: Bingbu Cao <bingbu.cao@intel.com>,
	Hans de Goede <hansg@kernel.org>,
	mehdi.djait@intel.com
Subject: [PATCH v2 15/23] media: i2c: ov01a10: Use native and default for pixel-array size names
Date: Mon, 12 Jan 2026 11:59:41 +0200	[thread overview]
Message-ID: <20260112095949.3851-16-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20260112095949.3851-1-sakari.ailus@linux.intel.com>

From: Hans de Goede <hansg@kernel.org>

According to the OV01A10 product-brief PDF the OV01A10 has an active pixel
array size of 1296x816. In otherwords the native and active sizes are
the same.

Replace the (misspelled) ACTIVE defines for the default resolution of
1280x800 with DEFAULT to avoid giving the impression that the active pixel
array size is only 1280x800.

And replace PIXEL_ARRAY with NATIVE to make clear this is the native pixel
array size / to match the V4L2_SEL_TGT_NATIVE_SIZE naming.

Signed-off-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/i2c/ov01a10.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c
index 6dcd982cf8eb..3eb6445b8f00 100644
--- a/drivers/media/i2c/ov01a10.c
+++ b/drivers/media/i2c/ov01a10.c
@@ -34,10 +34,10 @@
 #define OV01A10_MODE_STREAMING		0x01
 
 /* pixel array */
-#define OV01A10_PIXEL_ARRAY_WIDTH	1296
-#define OV01A10_PIXEL_ARRAY_HEIGHT	816
-#define OV01A10_ACITVE_WIDTH		1280
-#define OV01A10_ACITVE_HEIGHT		800
+#define OV01A10_NATIVE_WIDTH		1296
+#define OV01A10_NATIVE_HEIGHT		816
+#define OV01A10_DEFAULT_WIDTH		1280
+#define OV01A10_DEFAULT_HEIGHT		800
 
 /* vertical and horizontal timings */
 #define OV01A10_REG_VTS			CCI_REG16(0x380e)
@@ -270,8 +270,8 @@ static const struct ov01a10_link_freq_config link_freq_configs[] = {
 
 static const struct ov01a10_mode supported_modes[] = {
 	{
-		.width = OV01A10_ACITVE_WIDTH,
-		.height = OV01A10_ACITVE_HEIGHT,
+		.width = OV01A10_DEFAULT_WIDTH,
+		.height = OV01A10_DEFAULT_HEIGHT,
 		.hts = OV01A10_HTS_DEF,
 		.vts_def = OV01A10_VTS_DEF,
 		.vts_min = OV01A10_VTS_MIN,
@@ -642,8 +642,8 @@ static int ov01a10_init_state(struct v4l2_subdev *sd,
 	struct v4l2_subdev_format fmt = {
 		.which = V4L2_SUBDEV_FORMAT_TRY,
 		.format = {
-			.width = OV01A10_ACITVE_WIDTH,
-			.height = OV01A10_ACITVE_HEIGHT,
+			.width = OV01A10_DEFAULT_WIDTH,
+			.height = OV01A10_DEFAULT_HEIGHT,
 		},
 	};
 
@@ -692,17 +692,17 @@ static int ov01a10_get_selection(struct v4l2_subdev *sd,
 	case V4L2_SEL_TGT_CROP_BOUNDS:
 		sel->r.top = 0;
 		sel->r.left = 0;
-		sel->r.width = OV01A10_PIXEL_ARRAY_WIDTH;
-		sel->r.height = OV01A10_PIXEL_ARRAY_HEIGHT;
+		sel->r.width = OV01A10_NATIVE_WIDTH;
+		sel->r.height = OV01A10_NATIVE_HEIGHT;
 		return 0;
 	case V4L2_SEL_TGT_CROP:
 	case V4L2_SEL_TGT_CROP_DEFAULT:
-		sel->r.top = (OV01A10_PIXEL_ARRAY_HEIGHT -
-			      OV01A10_ACITVE_HEIGHT) / 2;
-		sel->r.left = (OV01A10_PIXEL_ARRAY_WIDTH -
-			       OV01A10_ACITVE_WIDTH) / 2;
-		sel->r.width = OV01A10_ACITVE_WIDTH;
-		sel->r.height = OV01A10_ACITVE_HEIGHT;
+		sel->r.top = (OV01A10_NATIVE_HEIGHT -
+			      OV01A10_DEFAULT_HEIGHT) / 2;
+		sel->r.left = (OV01A10_NATIVE_WIDTH -
+			       OV01A10_DEFAULT_WIDTH) / 2;
+		sel->r.width = OV01A10_DEFAULT_WIDTH;
+		sel->r.height = OV01A10_DEFAULT_HEIGHT;
 		return 0;
 	}
 
-- 
2.47.3


  parent reply	other threads:[~2026-01-12 10:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12  9:59 [PATCH v2 00/23] media: i2c: ov01a10: Add crop, ov01a1b support Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 01/23] media: i2c: ov01a10: Fix the horizontal flip control Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 02/23] media: i2c: ov01a10: Fix reported pixel-rate value Sakari Ailus
2026-01-13  2:43   ` Bingbu Cao
2026-01-12  9:59 ` [PATCH v2 03/23] media: i2c: ov01a10: Fix analogue gain range Sakari Ailus
2026-01-13  2:42   ` Bingbu Cao
2026-01-12  9:59 ` [PATCH v2 04/23] media: i2c: ov01a10: Add missing v4l2_subdev_cleanup() calls Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 05/23] media: i2c: ov01a10: Fix passing stream instead of pad to v4l2_subdev_state_get_format() Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 06/23] media: i2c: ov01a10: Fix test-pattern disabling Sakari Ailus
2026-01-13  2:59   ` Bingbu Cao
2026-01-13  8:14     ` Sakari Ailus
2026-01-13 10:41       ` Hans de Goede
2026-01-13 10:40     ` Hans de Goede
2026-01-12  9:59 ` [PATCH v2 07/23] media: i2c: ov01a10: Change default vblank value to a vblank resulting in 30 fps Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 08/23] media: i2c: ov01a10: Convert to new CCI register access helpers Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 09/23] media: i2c: ov01a10: Remove overly verbose probe() error reporting Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 10/23] media: i2c: ov01a10: Store dev pointer in struct ov01a10 Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 11/23] media: i2c: ov01a10: Add ov01a10_check_hwcfg() function Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 12/23] media: i2c: ov01a10: Add power on/off sequencing support Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 13/23] media: i2c: ov01a10: Don't update pixel_rate and link_freq from set_fmt Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 14/23] media: i2c: ov01a10: Move setting of ctrl->flags to after checking ctrl_hdlr->error Sakari Ailus
2026-01-12  9:59 ` Sakari Ailus [this message]
2026-01-12  9:59 ` [PATCH v2 16/23] media: i2c: ov01a10: Add cropping support / allow arbitrary sizes Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 17/23] media: i2c: ov01a10: Remove struct ov01a10_reg_list Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 18/23] media: i2c: ov01a10: Replace exposure->min/step with direct define use Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 19/23] media: i2c: ov01a10: Only set register 0x0305 once Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 20/23] media: i2c: ov01a10: Remove values set by controls from global_setting[] Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 21/23] media: i2c: ov01a10: Add ov01a10_sensor_cfg struct Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 22/23] media: i2c: ov01a10: Optimize setting h/vflip values Sakari Ailus
2026-01-12  9:59 ` [PATCH v2 23/23] media: i2c: ov01a10: Add ov01a1b support Sakari Ailus

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=20260112095949.3851-16-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=hansg@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mehdi.djait@intel.com \
    /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