clk_hw_regis...d_rate_kunit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… clk_hw_register_fixed_rate_kunit πŸ’…

okay so bestie, this is a Kernel API Manual page, section 9 β€” and it's genuinely one of those little helper functions that makes testing clock drivers not a whole ordeal. It lives in the kernel, it's doing the most, and it's here to help you test-register a fixed-rate clock. periodt ✨


🌸 NAME 🌸

clk_hw_register_fixed_rate_kunit β€” it's the test-managed version of __clk_hw_register_fixed_rate(). like, the same energy, but it knows it's inside a KUnit test and it handles itself accordingly πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct clk_hw * clk_hw_register_fixed_rate_kunit (struct kunit *test ,
       struct clk_hw_fixed_rate_kunit_params *params );

that's it, that's the whole vibe check. it hands you back a struct clk_hw * β€” or it doesn't, and we'll get to that πŸ”₯


✨ ARGUMENTS ✨

  • test β€” your test context 🧚 it's the struct kunit * that tells everything "yes, we're inside a test right now, act accordingly."
  • params β€” the actual arguments that get passed straight through to __clk_hw_register_fixed_rate. lowkey the important one, honestly 🫢

πŸ‘‘ RETURN πŸ‘‘

you get back the registered fixed-rate clk_hw β€” iconic, perfect, exactly what you wanted.

or, if things go sideways, you get an ERR_PTR on failure. so like, always check it bestie, don't just assume. IS_ERR() is your friend fr fr 😭


🌈 SEE ALSO 🌈

  • the kernel file ./drivers/clk/clk-fixed-rate_test.c β€” that's the whole reason this exists, go read it πŸ“–
  • clk_hw_fixed_rate_kunit_params(9) β€” the struct that params points at, the blueprint of it all πŸŽ€
  • clk_hw_unregister_fixed_rate_kunit(9) β€” the cleanup bestie, because what goes up must come down πŸ’…

ngl this whole thing is test-only territory β€” it's built for KUnit so it can do the managed-registration thing. don't be out here using it in production driver code, that's not the assignment 🚫

and that's the page!! source lives in ./drivers/clk (the kernel tree, obviously), dated October 2026, and this little Kernel API Manual entry was brought to you by that same path β€” mwah, go write some tests, you're gonna slay πŸ“πŸ’œ

πŸ“¦ where this page comes from