Skip to content

Commit

Permalink
drives: media: imx708: Put HFLIP and VFLIP controls in a cluser
Browse files Browse the repository at this point in the history
Create a cluster for the HVLIP and VFLIP controls so they are treated
as a single composite control.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
  • Loading branch information
naushir committed Mar 31, 2023
1 parent 192c132 commit 0a27699
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/media/i2c/imx708.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,12 +819,14 @@ struct imx708 {
/* V4L2 Controls */
struct v4l2_ctrl *pixel_rate;
struct v4l2_ctrl *exposure;
struct v4l2_ctrl *vflip;
struct v4l2_ctrl *hflip;
struct v4l2_ctrl *vblank;
struct v4l2_ctrl *hblank;
struct v4l2_ctrl *hdr_mode;
struct v4l2_ctrl *link_freq;
struct {
struct v4l2_ctrl *hflip;
struct v4l2_ctrl *vflip;
};

/* Current mode */
const struct imx708_mode *mode;
Expand Down Expand Up @@ -1815,6 +1817,7 @@ static int imx708_init_controls(struct imx708 *imx708)

imx708->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx708_ctrl_ops,
V4L2_CID_VFLIP, 0, 1, 1, 0);
v4l2_ctrl_cluster(2, &imx708->hflip);

v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &imx708_ctrl_ops,
V4L2_CID_TEST_PATTERN,
Expand Down

0 comments on commit 0a27699

Please sign in to comment.