_init_main_clk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… _init_main_clk β€” Kernel API Manual (yes bestie, the man page name is right there)

Okay so we're in _init_main_clk(9) territory, the Kernel API Manual, and honestly? It's a little guy with one job and it does it. Let's get into it πŸŽ€


✨ NAME ✨

_init_main_clk β€” grab a struct clk * for the hwmod's main functional clock. That's it, that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

int _init_main_clk (struct omap_hwmod *oh );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • oh β€” a struct omap_hwmod *. Yeah, that's the whole description. The original said nothing more, so neither will I. Mysterious queen energy πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

So this function gets called from _init_clocks. Not by you, not by me β€” by _init_clocks. Respect the chain of command, bestie.

What it does: it populates the _clk on oh β€” that's the main functional clock pointer β€” and it does that if either a clock matching the hwmod name is found, or a main_clk is present. Either-or, both are valid paths, no cap.

Returns 0 on success or -EINVAL on error. So if you see -EINVAL? That's the "something's off" signal, literally. 😭


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./arch/arm/mach-omap2/omap_hwmod.c, plus the whole extended friend group:

Like I said. Extended friend group. Every single one of them is invited to the group chat πŸ’€πŸ«Ά


tiny sign-off 🧚

This lil page lives in ./arch/arm/mach-omap2 and it's dated October 2026 β€” so bestie, mark your calendar, because _init_main_clk(9) said "see you then" βœ¨πŸ’–

πŸ“¦ where this page comes from