clk_get_kunit(9)
β¨ clk_get_kunit(9) β¨
okay so real talk, this is a page from the Kernel API Manual, and it's literally about clk_get_kunit β bestie, it's a test-managed version of clk_get() π
πΈ NAME πΈ
clk_get_kunit β it's the Test managed clk_get(), no cap π
π¦ SYNOPSIS π¦
struct clk * clk_get_kunit (struct kunit *test , struct device *dev ,
const char *con_id );
like, that's the whole vibe right there β¨
π ARGUMENTS π
testβ the test context π§ͺ this is thestruct kunit *running the show, main character energydevβ the device for the clock "consumer" π± yes the quotes are in the original, it's giving very intentionalcon_idβ the clock consumer ID π the name the consumer knows it by
π DESCRIPTION π
Just like clk_get, bestie β except the clk is managed by the test case π« and it's automatically put with clk_put after the test case concludes. so you literally don't have to clean up after yourself, which is iconic behavior honestly π«Ά
π₯ RETURN π₯
- a new clk consumer π
- or
ERR_PTRon failure π (check it, fr fr, don't just yolo it)
β SEE ALSO β
Kernel file ./drivers/clk/clk_kunit_helpers.c π β go read it, iykyk
clk_prepare_enable_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)of_clk_add_hw_provider_kunit(9)
all the kunit clk besties, assembled πΈπ
ngl the whole point is: use this instead of rawclk_getinside a test and the test framework handles theclk_putfor you. slay.
that's the whole page, mwah π β brought to you by the ./drivers/clk crew, dated October 2026, and yeah the manual name is clk_get_kunit(9) in case you forgot already π bye bestie, go write some tests πβ¨
π¦ 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