]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: v4l2-common: Update v4l2_get_link_freq() documentation
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 21 Aug 2025 11:56:49 +0000 (14:56 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 25 Aug 2025 13:40:41 +0000 (15:40 +0200)
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 <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
include/media/v4l2-common.h

index ab0ce8e605c333de7aee3400537fb1f3ba80cee3..e31b4434ea5d5ada152f1dfc58b793ee8629f7d7 100644 (file)
@@ -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