media: st-mipid02: add support of V4L2_CID_LINK_FREQ
authorHugues Fruchet <hugues.fruchet@st.com>
Mon, 17 Jun 2019 13:43:31 +0000 (09:43 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 24 Jun 2019 15:34:19 +0000 (11:34 -0400)
commit6a381d1072f174cb80a27526a7ccdcfd6604ecb2
tree89493018f5e0fe2386f79059173810b3b692b206
parent81a409bfd5517d537097d3cfdfed7f8bf8ac469c
media: st-mipid02: add support of V4L2_CID_LINK_FREQ

Ask device connected on sink pad for link frequency
in order to configure CLK_LANE_REG1 (ui_x4).
If not available, ask for pixel rate information to compute it.

This is needed to deal with compressed format such as JPEG
where number of bits per pixel is unknown: computation of
link frequency from pixel rate is not possible.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/st-mipid02.c