]> www.infradead.org Git - users/hch/misc.git/commitdiff
media: v4l2-common: Improve devm_v4l2_sensor_clk_get() documentation
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 14 Aug 2025 13:50:07 +0000 (16:50 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 14 Aug 2025 14:01:39 +0000 (16:01 +0200)
Remove the extra leading period and provide more elaborate explanation for
why devm_v4l2_sensor_clk_get() is only allowed to be used on camera sensor
devices.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
include/media/v4l2-common.h

index 9d6c236e8f1460d8a748104f43da9d9559e601e9..39dd0c78d70f7b935c2e10f9767646d2cedd3079 100644 (file)
@@ -623,7 +623,7 @@ int v4l2_link_freq_to_bitmap(struct device *dev, const u64 *fw_link_freqs,
 
 /**
  * devm_v4l2_sensor_clk_get - lookup and obtain a reference to a clock producer
- *     for a camera sensor.
+ *     for a camera sensor
  *
  * @dev: device for v4l2 sensor clock "consumer"
  * @id: clock consumer ID
@@ -643,6 +643,14 @@ int v4l2_link_freq_to_bitmap(struct device *dev, const u64 *fw_link_freqs,
  *
  * In this case try to set the clock-frequency value to the provided clock.
  *
+ * As the name indicates, this function may only be used on camera sensor
+ * devices. This is because generally only camera sensors do need a clock to
+ * query the frequency from, due to the requirement to configure the PLL for a
+ * given CSI-2 interface frequency where the sensor's external clock frequency
+ * is a factor. Additionally, the clock frequency tends to be available on ACPI
+ * firmware based systems for camera sensors specifically (if e.g. DisCo for
+ * Imaging compliant).
+ *
  * Returns a pointer to a struct clk on success or an error pointer on failure.
  */
 struct clk *devm_v4l2_sensor_clk_get(struct device *dev, const char *id);