devm_clk_bulk_get(9)
πΈ devm_clk_bulk_get (9) β Kernel API Manual β¨
okay bestie, welcome to the glow-up era of <pink>devm_clk_bulk_get</pink> π
this one lives in the Kernel API Manual and it's literally the managed version of grabbing a whole squad of clock consumers at once. main character energy fr fr π
π NAME π
devm_clk_bulk_get β managed get multiple clk consumers πππ
β¨ SYNOPSIS β¨
int devm_clk_bulk_get (struct device *dev , int num_clks , struct clk_bulk_data *clks );
π«Ά ARGUMENTS π«Ά
devβ the device that's acting as the clock "consumer". yeah, like the customer. the one who wants the clocks. πnum_clksβ the number ofclk_bulk_data. literally how many you're asking for, bestie. count them. π’clksβ theclk_bulk_datatable of the consumer. this is where the goods land π
π DESCRIPTION π
So here's the vibe: it returns 0 on success, and an errno on failure. that's it. no cap π§
This helper function lets drivers get several clk consumers in one single operation β with management β¨ β and the clks will automatically be freed when the device is unbound. the way that it just cleans up after itself?? iconic. no manual clk_bulk_put era for you, you're free π
β οΈ real talk though: it's return value first, everything else second β always check that0vserrno, bestie, because failure is a whole mood you do NOT want to discover later π
π SEE ALSO π
Kernel file ./include/linux/clk.h β plus the whole friend group, and yes, they're all invited:
clk notifier callback types(9)struct clk_notifier(9)struct clk_notifier_data(9)struct clk_bulk_data(9)clk_notifier_register(9)clk_notifier_unregister(9)devm_clk_notifier_register(9)clk_get_accuracy(9)clk_set_phase(9)clk_get_phase(9)clk_set_duty_cycle(9)clk_get_scaled_duty_cycle(9)clk_is_match(9)clk_rate_exclusive_get(9)devm_clk_rate_exclusive_get(9)clk_rate_exclusive_put(9)clk_save_context(9)clk_restore_context(9)clk_prepare(9)clk_unprepare(9)clk_is_enabled_when_prepared(9)clk_get(9)clk_bulk_get(9)clk_bulk_get_all(9)clk_bulk_get_optional(9)devm_clk_bulk_get_optional(9)devm_clk_bulk_get_enable(9)devm_clk_bulk_get_optional_enable(9)devm_clk_bulk_get_all(9)devm_clk_bulk_get_all_enabled(9)devm_clk_get(9)devm_clk_get_prepared(9)devm_clk_get_enabled(9)devm_clk_get_optional(9)devm_clk_get_optional_prepared(9)devm_clk_get_optional_enabled(9)devm_clk_get_optional_enabled_with_rate(9)devm_get_clk_from_child(9)clk_enable(9)clk_bulk_enable(9)clk_disable(9)clk_bulk_disable(9)clk_get_rate(9)clk_put(9)clk_bulk_put(9)clk_bulk_put_all(9)devm_clk_put(9)clk_round_rate(9)clk_set_rate(9)clk_set_rate_exclusive(9)clk_has_parent(9)clk_set_rate_range(9)clk_set_min_rate(9)clk_set_max_rate(9)clk_set_parent(9)clk_get_parent(9)clk_get_sys(9)clk_drop_range(9)clk_get_optional(9)
and that's the page!! π go off, grab your clocks, let the devres machinery handle the cleanup β it's giving responsible adult π¦
πΈ cute sign-off: this beauty lives in ./include/linux and it's dated October 2026 β bookmark it, screenshot it, put it on your fridge π mwah π
π¦ 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