]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: i2c: imx219: Rename VTS to FRM_LENGTH
authorJai Luthra <jai.luthra@ideasonboard.com>
Tue, 4 Feb 2025 07:04:37 +0000 (12:34 +0530)
committerHans Verkuil <hverkuil@xs4all.nl>
Sat, 15 Feb 2025 14:23:00 +0000 (15:23 +0100)
The IMX219 datasheet refers to the vertical length + blanking as
FRM_LENGTH instead of VTS.

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/imx219.c

index dd5a8577d7479e22660b4d8fc9903a7c05bb6fad..542f59892b20c577208f9d459a27e44721578b1f 100644 (file)
@@ -70,9 +70,8 @@
 #define IMX219_EXPOSURE_MAX            65535
 
 /* V_TIMING internal */
-#define IMX219_REG_VTS                 CCI_REG16(0x0160)
-#define IMX219_VTS_MAX                 0xffff
-
+#define IMX219_REG_FRM_LENGTH_A                CCI_REG16(0x0160)
+#define IMX219_FLL_MAX                 0xffff
 #define IMX219_VBLANK_MIN              32
 
 /* HBLANK control - read only */
@@ -155,7 +154,7 @@ struct imx219_mode {
        unsigned int height;
 
        /* V-timing */
-       unsigned int vts_def;
+       unsigned int fll_def;
 };
 
 static const struct cci_reg_sequence imx219_common_regs[] = {
@@ -314,25 +313,25 @@ static const struct imx219_mode supported_modes[] = {
                /* 8MPix 15fps mode */
                .width = 3280,
                .height = 2464,
-               .vts_def = 3526,
+               .fll_def = 3526,
        },
        {
                /* 1080P 30fps cropped */
                .width = 1920,
                .height = 1080,
-               .vts_def = 1763,
+               .fll_def = 1763,
        },
        {
                /* 2x2 binned 30fps mode */
                .width = 1640,
                .height = 1232,
-               .vts_def = 1763,
+               .fll_def = 1763,
        },
        {
                /* 640x480 30fps mode */
                .width = 640,
                .height = 480,
-               .vts_def = 1763,
+               .fll_def = 1763,
        },
 };
 
@@ -443,7 +442,7 @@ static int imx219_set_ctrl(struct v4l2_ctrl *ctrl)
                          imx219->hflip->val | imx219->vflip->val << 1, &ret);
                break;
        case V4L2_CID_VBLANK:
-               cci_write(imx219->regmap, IMX219_REG_VTS,
+               cci_write(imx219->regmap, IMX219_REG_FRM_LENGTH_A,
                          format->height + ctrl->val, &ret);
                break;
        case V4L2_CID_TEST_PATTERN_RED:
@@ -518,15 +517,15 @@ static int imx219_init_controls(struct imx219 *imx219)
        /* Initial vblank/hblank/exposure parameters based on current mode */
        imx219->vblank = v4l2_ctrl_new_std(ctrl_hdlr, &imx219_ctrl_ops,
                                           V4L2_CID_VBLANK, IMX219_VBLANK_MIN,
-                                          IMX219_VTS_MAX - mode->height, 1,
-                                          mode->vts_def - mode->height);
+                                          IMX219_FLL_MAX - mode->height, 1,
+                                          mode->fll_def - mode->height);
        hblank = IMX219_PPL_DEFAULT - mode->width;
        imx219->hblank = v4l2_ctrl_new_std(ctrl_hdlr, &imx219_ctrl_ops,
                                           V4L2_CID_HBLANK, hblank, hblank,
                                           1, hblank);
        if (imx219->hblank)
                imx219->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
-       exposure_max = mode->vts_def - 4;
+       exposure_max = mode->fll_def - 4;
        exposure_def = (exposure_max < IMX219_EXPOSURE_DEFAULT) ?
                exposure_max : IMX219_EXPOSURE_DEFAULT;
        imx219->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &imx219_ctrl_ops,
@@ -874,12 +873,12 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
 
                /* Update limits and set FPS to default */
                __v4l2_ctrl_modify_range(imx219->vblank, IMX219_VBLANK_MIN,
-                                        IMX219_VTS_MAX - mode->height, 1,
-                                        mode->vts_def - mode->height);
+                                        IMX219_FLL_MAX - mode->height, 1,
+                                        mode->fll_def - mode->height);
                __v4l2_ctrl_s_ctrl(imx219->vblank,
-                                  mode->vts_def - mode->height);
+                                  mode->fll_def - mode->height);
                /* Update max exposure while meeting expected vblanking */
-               exposure_max = mode->vts_def - 4;
+               exposure_max = mode->fll_def - 4;
                exposure_def = (exposure_max < IMX219_EXPOSURE_DEFAULT) ?
                        exposure_max : IMX219_EXPOSURE_DEFAULT;
                __v4l2_ctrl_modify_range(imx219->exposure,