]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: i2c: ov01a10: Use native and default for pixel-array size names
authorHans de Goede <hansg@kernel.org>
Tue, 14 Oct 2025 17:40:23 +0000 (19:40 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 13 Jan 2026 11:28:49 +0000 (12:28 +0100)
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>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/ov01a10.c

index 6dcd982cf8ebd482a57e060aaf06dd0084a8f975..3eb6445b8f00bbc1999d95220880e7520f05af97 100644 (file)
 #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;
        }