From: Sakari Ailus Date: Thu, 21 Aug 2025 11:56:49 +0000 (+0300) Subject: media: v4l2-common: Update v4l2_get_link_freq() documentation X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bdc9776dac860cae7f61e2b48929f87597306644;p=users%2Fhch%2Fmisc.git media: v4l2-common: Update v4l2_get_link_freq() documentation Document that v4l2_get_link_freq() obtains the link frequency primarily by calling the get_mbus_config sub-device pad operation. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil --- diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index ab0ce8e605c3..e31b4434ea5d 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -566,10 +566,12 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat, * @div: The divisor between pixel rate and link frequency. Number of data lanes * times two on D-PHY, 1 on parallel. 0 otherwise. * - * This function is intended for obtaining the link frequency from the - * transmitter sub-device's pad. It returns the link rate, either from the - * V4L2_CID_LINK_FREQ control implemented by the transmitter, or value - * calculated based on the V4L2_CID_PIXEL_RATE implemented by the transmitter. + * This function obtains and returns the link frequency from the transmitter + * sub-device's pad. The link frequency is retrieved using the get_mbus_config + * sub-device pad operation. If this fails, the function falls back to obtaining + * the frequency either directly from the V4L2_CID_LINK_FREQ control if + * implemented by the transmitter, or by calculating it from the pixel rate + * obtained from the V4L2_CID_PIXEL_RATE control. * * Return: * * >0: Link frequency