Skip to content

Commit

Permalink
media: imx296: Add the link frequency control
Browse files Browse the repository at this point in the history
Add the V4L2_CID_LINK_FREQ menu control for the imx296. Report a single value
of 1188 Mhz for the link frequency.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
  • Loading branch information
naushir authored and pelwell committed May 20, 2022
1 parent aed96c1 commit 0fffce9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/media/i2c/imx296.c
Expand Up @@ -308,6 +308,10 @@ static const char * const imx296_test_pattern_menu[] = {
"Checks",
};

static const s64 imx296_link_freq_menu[] = {
1188000000ULL,
};

static void imx296_adjust_exposure_range(struct imx296 *sensor,
struct v4l2_ctrl *ctrl)
{
Expand Down Expand Up @@ -412,7 +416,7 @@ static int imx296_ctrls_init(struct imx296 *sensor)
if (ret < 0)
return ret;

v4l2_ctrl_handler_init(&sensor->ctrls, 11);
v4l2_ctrl_handler_init(&sensor->ctrls, 12);

sensor->exposure = v4l2_ctrl_new_std(&sensor->ctrls, &imx296_ctrl_ops,
V4L2_CID_EXPOSURE, 1, 1048575, 1,
Expand Down Expand Up @@ -463,6 +467,10 @@ static int imx296_ctrls_init(struct imx296 *sensor)
ARRAY_SIZE(imx296_test_pattern_menu) - 1,
0, 0, imx296_test_pattern_menu);

v4l2_ctrl_new_int_menu(&sensor->ctrls, NULL, V4L2_CID_LINK_FREQ,
ARRAY_SIZE(imx296_link_freq_menu) - 1, 0,
imx296_link_freq_menu);

v4l2_ctrl_new_fwnode_properties(&sensor->ctrls, &imx296_ctrl_ops,
&props);

Expand Down

0 comments on commit 0fffce9

Please sign in to comment.