From: Sakari Ailus Date: Thu, 14 Aug 2025 13:50:07 +0000 (+0300) Subject: media: v4l2-common: Improve devm_v4l2_sensor_clk_get() documentation X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2412f16c9afa7710778fc032139a6df38b68fd7c;p=users%2Fhch%2Fmisc.git media: v4l2-common: Improve devm_v4l2_sensor_clk_get() documentation 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 Signed-off-by: Hans Verkuil --- diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 9d6c236e8f14..39dd0c78d70f 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -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);