devm_v4l2_sensor_clk_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 _DSD property 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


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