public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c: ov5647: handle V4L2_CID_LINK_FREQ in s_ctrl
@ 2026-03-22 13:53 Suraj Sonawane
  2026-03-22 22:43 ` Sakari Ailus
  2026-03-23 15:37 ` Dave Stevenson
  0 siblings, 2 replies; 5+ messages in thread
From: Suraj Sonawane @ 2026-03-22 13:53 UTC (permalink / raw)
  To: Dave Stevenson, Jacopo Mondi, Sakari Ailus, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Suraj Sonawane

Handle V4L2_CID_LINK_FREQ in ov5647_s_ctrl().

Currently this control is defined but not handled in s_ctrl(),
so V4L2 falls back to estimating link frequency from pixel rate
and prints warning like:

  v4l2_get_link_freq: Link frequency estimated using pixel rate: 
  result might be inaccurate
  v4l2_get_link_freq: Consider implementing support for V4L2_CID_LINK_FREQ
  in the transmitter driver

Handle it as no-op since link frequency is fixed per mode and
not meant to be changed at runtime.

Avoid these warnings when control is queried.

Signed-off-by: Suraj Sonawane <surajsonawane0215@gmail.com>
---
 drivers/media/i2c/ov5647.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index 6a46ef723..a5a9cff5a 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -999,6 +999,9 @@ static int ov5647_s_ctrl(struct v4l2_ctrl *ctrl)
 		ret = cci_write(sensor->regmap, OV5647_REG_HTS,
 				sensor->mode->format.width + ctrl->val, &ret);
 		break;
+	case V4L2_CID_LINK_FREQ:
+		ret = 0;
+		break;
 	case V4L2_CID_TEST_PATTERN:
 		ret = cci_write(sensor->regmap, OV5647_REG_ISPCTRL3D,
 				ov5647_test_pattern_val[ctrl->val], NULL);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-24  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-22 13:53 [PATCH] media: i2c: ov5647: handle V4L2_CID_LINK_FREQ in s_ctrl Suraj Sonawane
2026-03-22 22:43 ` Sakari Ailus
2026-03-23 15:37 ` Dave Stevenson
2026-03-23 18:44   ` Jacopo Mondi
2026-03-24  9:38     ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox