devm_clk_bu..._all_enabled(9)
β¨ devm_clk_bulk_get_all_enabled β¨
okay bestie so this is a page from the Kernel API Manual and it's about one (1) extremely helpful little function. buckle up, it's lowkey iconic π
πΈ NAME πΈ
devm_clk_bulk_get_all_enabled β get and enable all the clocks of the consumer, and do it managed, periodt π
π¦ SYNOPSIS π¦
int devm_clk_bulk_get_all_enabled (struct device *dev , struct
clk_bulk_data **clks );
like literally that's it, that's the whole signature, she's compact π
π ARGUMENTS π
devβ the device that's being the clock "consumer" here (yes, that's the actual word they use, it's giving very main character energy π)clksβ a pointer to the consumer'sclk_bulk_datatable ποΈ
π§ DESCRIPTION π§
okay so here's the tea β β the return value is doing a little bit of everything:
- returns a positive value = that's the number of clocks obtained, and the clock references get stored in the
clk_bulk_datatable in theclksfield π - returns
0if there're none at all β like nobody showed up to the party π - returns a negative value if something failed β code red, something went wrong π
This helper function lets drivers get all the clocks of the consumer and enable them in one single operation, with management included, no cap π«Ά
The clks will automatically be disabled and freed when the device is unbound β like she cleans up after herself, we stan a responsible icon β¨
π SEE ALSO π
Kernel file ./include/linux/clk.h β plus this whole friend group right here:
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(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_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)
like yes that's a lot of friends, she's verywell-connected ππ
ngl if your driver is juggling a whole squad of clocks and you don't wanna babysit each one, this is your girl π
that's the whole page bestie, love u, see u in the next one π«Άπ this one lives in ./include/linux and it's dated October 2026 β mwah, bye! πβ¨
π¦ 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