_add_hwmod_clocks_clkdev(9)
π _add_hwmod_clocks_clkdev(9) β the kernel API manual, but make it make sense
okay bestie, welcome to the _add_hwmod_clocks_clkdev page from the Kernel API Manual β¨ this one's a kernel-internals girlie, so grab a lil snack and let's get into it π
πΈ NAME πΈ
_add_hwmod_clocks_clkdev β adds a clkdev entry for the hwmod optional clocks and the main clock, no cap π
β¨ SYNOPSIS β¨
void _add_hwmod_clocks_clkdev (struct omap_device *od , struct omap_hwmod *oh );
like, that's the whole vibe. void, two pointers, we move π¦
π ARGUMENTS π
odβ astruct omap_device *od. yeah that's literally it, that's the whole description, the manpage said so and I'm not gonna invent lore πohβ astruct omap_hwmod *oh. same energy. pointer. hwmod. iconic π
π§ DESCRIPTION π§
so here's what she does π for the main clock and for every optional clock present per hwmod per omap_device, this function adds an entry into the clkdev table shaped like this:
<dev-id=dev_name, con-id=role>
β¦but only if it does not exist already. no duplicates, we're not messy like that π«Ά
and why do we care? because this is what lets drivers get a pointer to their optional clocks based on their role, by calling:
clk_get(<dev*>, <role>)
for the main clock, a "fck" alias is used β that's the little nickname, iykyk β
and the return value? none. no return value, she returns nothing, void is the whole personality. periodt π
π₯ SEE ALSO π₯
- Kernel file
./arch/arm/mach-omap2/omap_device.cβ go read the source bestie, it's all in there π omap_device_build_from_dt(9)_omap_device_enable_hwmods(9)_omap_device_idle_hwmods(9)omap_device_alloc(9)omap_device_enable(9)omap_device_idle(9)omap_device_assert_hardreset(9)omap_device_deassert_hardreset(9)omap_device_late_idle(9)
go off, read them all, the omap2 section of the kernel is right there and it ate π
ngl this page is short but she's still doing main character energy in ./arch/arm/mach-omap2, October 2026, kernel API manual edition π§ββοΈπ
mwah, that's the whole page, love u, bye π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms