of_clk_add_h...ovider_kunit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 reading
  • np β€” the device node pointer that's associated with the clock provider 🌈
  • get β€” callback for decoding clk_hw ✨
  • data β€” the context pointer handed to the get callback πŸŽ€

πŸ¦‹ 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 ⭐

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