devm_clk_hw...or_parent_hw(9)
π« devm_clk_hw...or_parent_hw(9) π«
okay so bestie, welcome to the Kernel API Manual β yes, the actual one, the kernel docs, we're doing this π«Ά grab a strawberry drink and let's go, because this function is lowkey iconic and you're gonna understand it fr fr.
β¨ NAME β¨
devm_clk_hw_register_fixed_factor_parent_hw β the function that registers a fixed factor clock, but with a pointer to the parent clock instead of... you know, not that. π
It's giving "I do one thing and I do it well", and that thing is: register your clock. Slay.
π SYNOPSIS π
okay here's the whole vibe in one line, copy it exactly, no cap:
devm_clk_hw_register_fixed_factor_parent_hw (dev , name , parent_hw ,
flags , mult , div );
That's the whole call. Six things. That's it. Periodt. β¨
πΈ ARGUMENTS πΈ
okay so every single one of these matters, no skipping, I see you π
devβ the device that is registering this clock. like, who is doing this. the main character of this whole operation πnameβ the name of this clock. give it a cute name, it deserves one πparent_hwβ pointer to parentclk. yes, the parent. the clock that came before. the icon, the legend πflagsβ the fixed factor flags. little toggles, big energy πmultβ the multiplier. multiply, bestie πdivβ the divider. divide, bestie π (mult and div are literally a couple, iykyk)
π₯ RETURN π₯
so what do you get back? you get:
a pointer to the clk_hw structure of the fixed factor clock that was registered β like, that's your clock, that's your baby, hold it carefully π₯Ή
or an error pointer. π and if that happens, please check it. please. don't rawdog an error pointer, it will not end well. check with IS_ERR() or whatever, just don't ignore it π
π¦ SEE ALSO π¦
okay this list is long long, but it's all relevant, so here we go β literally every single one of these, no cutting corners, they're all (9) manpages:
Kernel file ./include/linux/clk-provider.hβ the actual file, go read it, it's where the magic lives π§clk framework flags(9)struct clk_rate_request(9)struct clk_duty(9)struct clk_spread_spectrum(9)struct clk_ops(9)struct clk_parent_data(9)struct clk_init_data(9)struct clk_hw(9)struct clk_fixed_rate(9)clk_hw_register_fixed_rate(9)devm_clk_hw_register_fixed_rate(9)devm_clk_hw_register_fixed_rate_parent_data(9)clk_hw_register_fixed_rate_parent_hw(9)clk_hw_register_fixed_rate_parent_data(9)clk_hw_register_fixed_rate_with_accuracy(9)clk_hw_register_fixed_rate_with_accuracy_parent_hw(9)clk_hw_register_fixed_rate_with_accuracy_parent_data(9)clk_hw_register_fixed_rate_parent_accuracy(9)struct clk_gate(9)clk_hw_register_gate(9)clk_hw_register_gate_parent_hw(9)clk_hw_register_gate_parent_data(9)devm_clk_hw_register_gate(9)devm_clk_hw_register_gate_parent_hw(9)devm_clk_hw_register_gate_parent_data(9)struct clk_divider(9)clk_register_divider(9)clk_hw_register_divider(9)clk_hw_register_divider_parent_hw(9)clk_hw_register_divider_parent_data(9)clk_hw_register_divider_table(9)clk_hw_register_divider_table_parent_hw(9)clk_hw_register_divider_table_parent_data(9)devm_clk_hw_register_divider(9)devm_clk_hw_register_divider_parent_hw(9)devm_clk_hw_register_divider_parent_data(9)devm_clk_hw_register_divider_table(9)struct clk_mux(9)struct clk_fixed_factor(9)struct clk_fractional_divider(9)struct clk_multiplier(9)clk_hw_get_dev(9)clk_hw_get_of_node(9)
like I said. long long. but every one of them ate, so. π
vibe check π«Ά β this is adevm_function, meaning it's the managed version. everything in this list is your support system, so if you're confused about any single argument, just hop to one of those(9)pages. we love a documented ecosystem β¨
okay that's the whole page bestie!! go register some clocks, treat your error pointers with respect, and remember: fixed factor clocks are literally the moment π
sign-off time π β this masterpiece lives in ./include/linux, it's dated October 2026, and it's your girl devm_clk_hw...or_parent_hw(9) signing off. mwah πβ¨
π¦ 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