devm_clk_hw_...ivider_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_clk_hw_register_divider_table

okay so this little icon is straight out of the Kernel API Manual, and it's the devres glow-up of "register a table based divider clock with the clock framework." bestie, that's the whole vibe: it's a clock divider, but the lookup table kind, and it's managed for you. 🫢


πŸŽ€ NAME πŸŽ€

devm_clk_hw_register_divider_table β€” register a table based divider clock with the clock framework (devres variant). that's it, that's the function. devres variant means it's the one that cleans up after itself, iykyk. ✨


🌸 SYNOPSIS 🌸

devm_clk_hw_register_divider_table (dev , name , parent_name , flags ,
reg , shift , width , clk_divider_flags , table , lock );

ten arguments. yes ten. don't panic, we're going through every single one πŸ’…


πŸ’– ARGUMENTS πŸ’–

  • dev β€” the device that's registering this clock. like, whose house is this clock living in 🏠
  • name β€” name of this clock. give it a cute one, it deserves it ✨
  • parent_name β€” name of clock's parent. every main character has an origin story 🌈
  • flags β€” framework-specific flags. the framework's rules, not ours πŸŽ€
  • reg β€” register address to adjust divider. this is where the divider actually lives πŸ”₯
  • shift β€” number of bits to shift the bitfield. slide to the left, slide to the right πŸ’ƒ
  • width β€” width of the bitfield. how many bits we're working with, periodt
  • clk_divider_flags β€” divider-specific flags for this clock. different flag set, different vibe check πŸ’…
  • table β€” array of divider/value pairs ending with a div set to 0. ⚠️ that trailing zero is the terminator bestie β€” it's how the code knows the list is done, so don't be out here forgetting it 😭
  • lock β€” shared register lock for this clock. sharing is caring, and also prevents chaos πŸ”’

πŸ‘‘ SEE ALSO πŸ‘‘

okay this list is long and it ate, so let's give it the respect it deserves β€” the kernel file these live in is ./include/linux/clk-provider.h, and it's giving main character energy. go read all of these, fr fr πŸ¦‹


πŸ’€ reminder: that table has to be terminated with a div of 0, or the whole thing goes off the rails. no cap, that's the one thing that will bite you.

that's the whole page bestie, you're so welcome πŸ’œ and for the credits moment: this one lives under ./include/linux, dated October 2026 β€” those are the source/version and date sending their love from the footer. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from