STRUCT CLK_HW(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct clk_hw(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so real talk, this is a page from the Kernel API Manual and it's literally all about struct clk_hw β€” the glow-up handle that lets you vibe-check your way from a struct clk over to the hardware-specific struct that actually is the clock. main character energy fr fr ✨

🌸 NAME 🌸

struct clk_hw β€” a handle for traversing from a struct clk to its corresponding hardware-specific structure. no cap, that's the whole gig.

the way you use it: struct clk_hw should be declared within struct clk_foo and then referenced by the struct clk instance that uses struct clk_foo's clk_ops. that's the arrangement, periodt. πŸ’…

✨ SYNOPSIS ✨

struct clk_hw {
    struct clk_core *core;
    struct clk *clk;
    const struct clk_init_data *init;
 };

(that trailing space before the closing brace is canon, we don't touch it 🫢)

πŸ¦‹ Members πŸ¦‹

  • core β€” pointer to the struct clk_core instance that points right back at this struct clk_hw instance. it's giving mutuals. πŸ”
  • clk β€” pointer to the per-user struct clk instance that you can use to call into the clk API. this is your entry point, bestie, use it. πŸ‘‘
  • init β€” pointer to struct clk_init_data, which holds the init data shared with the common clock framework. heads up tho: this pointer will be set to NULL once a clk_register variant is called on this clk_hw pointer. so like… after registration it's gone gone, don't come for it. πŸ’€
ngl the init thing is the classic trap β€” check it before you register, not after. the struct itself says nothing more, we're just reading the receipts.

🌈 SEE ALSO 🌈

the whole friend group, in order, no one left out 🫢


and that's the page!! mwah πŸ’– this lil masterpiece lives at ./include/linux and it's dated October 2026 β€” so yeah, the struct clk_hw(9) you're reading is certified fresh off the kernel presses. go forth and register your clocks, bestie, you're gonna slay πŸ”₯πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from