clk_bulk_get_all(9)
π clk_bulk_get_all(9) β the Kernel API Manual page, bestie edition β¨
okay so this is a page from the Kernel API Manual, and it's about clk_bulk_get_all β yes the whole gang of clocks at once, we love a bulk moment π«Ά
πΈ NAME πΈ
clk_bulk_get_all β lookup and obtain all available references to clock producer. all of them. every single one. no cap π
β¨ SYNOPSIS β¨
int clk_bulk_get_all (struct device *dev , struct clk_bulk_data **clks );
like literally that's the whole signature, she's compact and she knows it π
π¦ ARGUMENTS π¦
devβ the device for clock "consumer" π (yep, "consumer" in quotes, that's how the page says it, we're not changing it)clksβ pointer to theclk_bulk_datatable of consumer. this is where all the acquired clock references get parked πβ¨
π DESCRIPTION π
so this helper function lets drivers get all clk consumers in one operation β one call, whole squad acquired, iconic behaviour honestly β
but listen: if any of the clk cannot be acquired, then any clks that were obtained will be freed before returning to the caller. no half-finished vibes, she cleans up after herself π§Ήπ
here's the return-value tea β:
- Returns a positive value for the number of clocks obtained, while the clock references are stored in the
clk_bulk_datatable inclksfield. π - Returns
0if there're none. - Returns a negative value if something failed. π
π¨ drivers must assume that the clock source is not enabled. do not assume it's on, bestie. it is not. periodt.
π and fr fr: clk_bulk_get should not be called from within interrupt context. just don't. not the vibe, not the move, not today π
π SEE ALSO π
the whole extended family, gathered for the group chat π«Ά:
- Kernel file
./include/linux/clk.h 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_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_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, bestie π it's from ./include/linux, dated October 2026, and it goes by clk_bulk_get_all(9) β go get those clocks, but like, all of them πβ¨π
π¦ 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