of_clk_hw_register_kunit(9)
π of_clk_hw_register_kunit(9) π
okay so bestie, welcome to the Kernel API Manual β this one's a lil helper from ./drivers/clk and it's genuinely so useful, let me tell you everything π«Ά
β¨ NAME β¨
of_clk_hw_register_kunit β the test-managed glow-up of of_clk_hw_register(). literally the same thing but the test case holds the aux cord π
πΈ SYNOPSIS πΈ
int of_clk_hw_register_kunit (struct kunit *test , struct device_node
*node , struct clk_hw *hw );
π¦ ARGUMENTS π¦
testβ the test context, aka where all the kunit magic lives β¨nodeβ thedevice_nodeof the device that's registering this clock, iykyk πhwβ the link to the hardware-specific clock data, the main character of the operation π
π DESCRIPTION π
So it's just like of_clk_hw_register, except β and this is the iconic part β the clk registration is managed by the test case and it gets automatically unregistered after the test case concludes. no cap, no manual cleanup, no tears ππ«Ά
it's giving "register it and forget it" energy, and honestly? obsessed π
β RETURN β
0on success π- a negative
errnovalue on failure π
π§ 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_add_hw_provider_kunit(9)
and that's the whole vibe, bestie π this lil page lives in ./drivers/clk, dated October 2026, and it's brought to you by of_clk_hw_register_kunit(9) β go forth, register those clocks, and let the test framework clean up after you ππ§ββοΈπ
π¦ 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