From 299b82078696ac14325a605b3d2727ff00d6e73e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 14 Oct 2025 19:40:23 +0200 Subject: [PATCH] media: i2c: ov01a10: Use native and default for pixel-array size names 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 Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- 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 6dcd982cf8ebd..3eb6445b8f00b 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