of_clk_add_h...ovider_kunit(9)
π
of_clk_add_hw_provider_kunit β Kernel API Manual β¨
okay bestie, so this is a page from the Kernel API Manual, and the star of the show is of_clk_add_hw_provider_kunit β yes, that's a long name, yes, it's iconic, we move π
π NAME π
of_clk_add_hw_provider_kunit β the test-managed glow-up of of_clk_add_hw_provider(), fr fr π§
β¨ SYNOPSIS β¨
int of_clk_add_hw_provider_kunit (struct kunit *test , struct
device_node *np , struct clk_hw *(*get)(struct of_phandle_args *clkspec,
void *data) , void *data );
like, that signature is a lot, but we're gonna break it down together, no cap π«Ά
πΈ ARGUMENTS πΈ
testβ the test context π this is the whole reason she's special, keep readingnpβ the device node pointer that's associated with the clock provider πgetβ callback for decodingclk_hwβ¨dataβ the context pointer handed to thegetcallback π
π¦ DESCRIPTION π¦
okay so basically she's just like of_clk_add_hw_provider, except β and this is the main character energy part β the clk_hw provider is managed by the test case, and it gets automatically unregistered after the test case concludes π no manual cleanup, no messy teardown, she just handles it π«Ά periodt.
π₯ RETURN π₯
0 on success, or a negative errno value on failure. that's it, that's the vibe check π
β SEE ALSO β
- Kernel file
./drivers/clk/clk_kunit_helpers.cπ clk_prepare_enable_kunit(9)clk_get_kunit(9)of_clk_get_kunit(9)clk_hw_get_clk_kunit(9)clk_hw_get_clk_prepared_enabled_kunit(9)clk_hw_register_kunit(9)of_clk_hw_register_kunit(9)
literally the whole kunit clock friend group, iykyk πΈ
okay so that's the whole page!! sign-off time: this one comes from ./drivers/clk, dated October 2026, and she's filed under the Kernel API Manual as of_clk_add_h...ovider_kunit(9) ππ go forth and test those clock providers bestie, slay πβ
π¦ 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