of_clk_get_kunit(9)
π of_clk_get_kunit(9)
okay so bestie, welcome to the Kernel API Manual β¨ this one is a tiny little helper that's giving very "test-only, don't @ me" energy and honestly? iconic behavior. let's get into it π
β¨ NAME β¨
of_clk_get_kunit β the test-managed glow-up of of_clk_get() π¦
πΈ SYNOPSIS πΈ
struct clk * of_clk_get_kunit (struct kunit *test , struct device_node
*np , int index );
like yes, that's the whole signature, no cap π
π ARGUMENTS π
testβ the test context π§ͺ like, the whole vibe of the test case lives herenpβ thedevice_nodefor the clock "consumer" π (yes "consumer" in quotes, the quotes are doing work)indexβ the index in the'clocks'property ofnpπ’
π DESCRIPTION π
so literally just like of_clk_get(), except the clk is managed by the test case β meaning it gets automatically clk_put when the test case concludes π«Ά set it and forget it, she cleans up after herself, main character energy fr fr β¨
β RETURN β
a new clk consumer π or ERR_PTR on failure π (check it bestie, always check it)
π SEE ALSO π
- Kernel file
./drivers/clk/clk_kunit_helpers.cπ clk_prepare_enable_kunit(9)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)of_clk_add_hw_provider_kunit(9)
the whole kunit clock friend group, obsessed π
mwah π this little page came from ./drivers/clk, dated October 2026, and it's filed under of_clk_get_kunit(9) β slay, go write some tests bestie π§
π¦ 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