omap2_clk_d...nd_companion(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ omap2_clk_dflt_find_companion πŸ¦‹

okay so you're in the Kernel API Manual, bestie, and the header is out here looking like omap2_clk_d...nd_companion(9) (iconic truncation, no notes πŸ’…). This page is all about finding the companion clock, and we're gonna keep every little detail, fr fr. ✨

🌸 NAME 🌸

omap2_clk_dflt_find_companion β€” find companion clock to @clk. πŸ•΅οΈβ€β™€οΈπŸ’–

✨ SYNOPSIS ✨

void omap2_clk_dflt_find_companion (struct clk_hw_omap *clk , struct
       clk_omap_reg *other_reg , u8 *other_bit );

πŸŽ€ ARGUMENTS πŸŽ€

  • clk β€” a struct clk * to find the companion clock of. πŸ‘€
  • other_reg β€” a void __iomem ** to return the companion clock CM_*CLKEN va in. (that "va" is literally what the page says, bestie πŸ™ˆ)
  • other_bit β€” a u8 ** to return the companion clock bit shift in. πŸ”

πŸ’œ NOTE πŸ’œ

okay so the tea β˜•:

  • We don't need special code here for INVERT_ENABLE for the time being, since INVERT_ENABLE only applies to clocks enabled by CM_CLKEN_PLL. 🫢
  • Convert CM_ICLKEN* <-> CM_FCLKEN*. This conversion assumes it's just a matter of XORing the bits. πŸ”₯
  • Some clocks don't have companion clocks. For example, modules with only an interface clock (such as MAILBOXES) don't have a companion clock. Right now, this code relies on the hardware exporting a bit in the correct companion register that indicates that the nonexistent 'companion clock' is active. Future patches will associate this type of code with per-module data structures to avoid this issue, and remove the casts. πŸ’€
No return value. like, none. void energy. πŸ«₯✨

🌈 SEE ALSO 🌈

okay bye bestie 🫢 this one's sourced from ./drivers/clk/ti, dated October 2026, and the page still goes by omap2_clk_d...nd_companion(9) πŸŽ€πŸ’–

πŸ“¦ where this page comes from