clk_get_sys(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… clk_get_sys(9) β€” Kernel API Manual ✨

okay so bestie, welcome to clk_get_sys β€” it's a Linux kernel API manual page and it's literally about grabbing a clock by name instead of by pointer, which is kind of iconic of it honestly πŸ•°οΈπŸ’–


🌸 NAME 🌸

clk_get_sys β€” get a clock based upon the device name


πŸŽ€ SYNOPSIS πŸŽ€

struct clk * clk_get_sys (const char *dev_id , const char *con_id );

✨ ARGUMENTS ✨

  • dev_id β€” the device name, like literally just the name string 🫢
  • con_id β€” the connection ID

πŸ’œ DESCRIPTION πŸ’œ

So it returns a struct clk that corresponds to the clock producer β€” or a valid IS_ERR condition carrying an errno if things went sideways 😭. The way this works is the implementation uses dev_id and con_id to figure out the clock consumer, and through that, the clock producer. Slay.

Here's the tea though, in contrast to clk_get this function takes the device name instead of the device itself for identification. Different vibe, same goal πŸ’….

⚠️ Drivers must assume that the clock source is not enabled. No cap, just assume it's off.
🚨 And lowkey important: clk_get_sys should not be called from within interrupt context. Periodt.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/clk.h plus the whole friend group πŸ‘‘:


🌈 and that's the whole page, bestie! this one's sourced from ./include/linux and dated October 2026 β€” go off, kernel docs πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from