devm_v4l2_sensor_clk_get(9)
π devm_v4l2_sensor_clk_get(9) π
okay so bestie, welcome to the Kernel API Manual β this one's devm_v4l2_sensor_clk_get(9), and it's literally the glow-up era of clock-getting for camera sensors β¨
πΈ NAME πΈ
devm_v4l2_sensor_clk_get β lookup and obtain a reference to a clock producer for a camera sensor π no cap, that's the whole vibe
β¨ SYNOPSIS β¨
struct clk * devm_v4l2_sensor_clk_get (struct device *dev , const char
*id );
like, yes, it wraps a little in the manual, but that's the signature, copy it exactly bestie π«Ά
π¦ ARGUMENTS π¦
devβ the device for the v4l2 sensor clock "consumer" (yes, "consumer" in quotes, that's literally how the manpage says it π )idβ the clock consumer ID
π₯ DESCRIPTION π₯
So this function behaves the same way as devm_clk_get, except where there is no clock producer β like on ACPI-based platforms. That's the whole twist π
For ACPI-based platforms, the function will read the "clock-frequency" ACPI _DSD property and register a fixed-clock with the frequency indicated in the property. iconic behaviour honestly β
This function also handles the special ACPI-based system case where:
- The
clock-frequency_DSDproperty is present. - A reference to the clock producer is present, where the clock is provided by a camera sensor PMIC driver (e.g.
int3472/tps68470.c)
In this case try to set the clock-frequency value to the provided clock. mmhmm, that's the move π§
As the name indicates, this function may only be used on camera sensor devices. Main character energy, but like, restricted main character energy π 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). iykyk π
Returns a pointer to a struct clk on success or an error pointer on failure. so like, check the return value, bestie, fr fr π
π SEE ALSO π
Kernel file ./include/media/v4l2-common.h
v4l2_ctrl_query_fill(9)enum v4l2_i2c_tuner_type(9)v4l2_i2c_new_subdev(9)v4l2_i2c_new_subdev_board(9)v4l2_i2c_subdev_set_name(9)v4l2_i2c_subdev_init(9)v4l2_i2c_subdev_addr(9)v4l2_i2c_tuner_addrs(9)v4l2_i2c_subdev_unregister(9)v4l2_spi_new_subdev(9)v4l2_spi_subdev_init(9)v4l2_spi_subdev_unregister(9)v4l_bound_align_image(9)v4l2_find_nearest_size_conditional(9)v4l2_find_nearest_size(9)v4l2_g_parm_cap(9)v4l2_s_parm_cap(9)enum v4l2_pixel_encoding(9)struct v4l2_format_info(9)v4l2_get_link_freq(9)v4l2_get_active_data_lanes(9)v4l2_link_freq_to_bitmap(9)devm_v4l2_sensor_clk_get_legacy(9)
okay that's the whole page, go read the source in <pink>./include/media</pink> whenever you want, and this one's dated October 2026 β devm_v4l2_sensor_clk_get(9) girlie signing off, slay π
ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms