STRUCT CLK_BRANCH(9)
π struct clk_branch(9) β Kernel API Manual
okay bestie, buckle up, because we're diving into the actual kernel API manual for struct clk_branch(9) and honestly? it's giving "small struct, big responsibilities." β¨
πΈ NAME πΈ
struct clk_branch β a gating clock with a status bit and dynamic hardware gating. yes, both. she's versatile. π
β SYNOPSIS β
here's the whole look, exactly as she appears:
struct clk_branch {
u32 hwcg_reg;
u32 halt_reg;
u8 hwcg_bit;
u8 halt_bit;
u8 halt_check;
#define BRANCH_VOTED BIT(7) ;
#define BRANCH_HALT 0 ;
#define BRANCH_HALT_VOTED (BRANCH_HALT | BRANCH_VOTED);
#define BRANCH_HALT_ENABLE 1 ;
#define BRANCH_HALT_ENABLE_VOTED (BRANCH_HALT_ENABLE |
BRANCH_VOTED);
#define BRANCH_HALT_DELAY 2 ;
#define BRANCH_HALT_SKIP 3 ;
struct clk_regmap clkr;
};
likeβ¦ the #defines living inside the struct definition? unhinged but iconic. we don't question it. π
π¦ Members π¦
hwcg_regβ the dynamic hardware clock gating register. this is where the magic (and the gating) actually lives, lowkey.halt_regβ the halt register. the "is she okay??" register, if you will.hwcg_bitβ ORed withhwcg_regto enable dynamic hardware clock gating. bit math, but make it fashion. πhalt_bitβ ANDed withhalt_regto test whether the clock is halted. yep, same energy, opposite operator.halt_checkβ which type of halt checking to perform. there are options, bestie, and they're all listed up in the synopsis. π«Άclkrβ the handle between the common and hardware-specific interfaces. the little connector between worlds. no cap.
β¨ Description β¨
it's a clock. it can gate its output. that's it, that's the whole description. π
ngl it's short, but likeβ¦ it's a clock that gates its output, that's genuinely a whole thing. periodt. π
π SEE ALSO π
- Kernel file
./drivers/clk/qcom/clk-branch.h struct clk_mem_branch(9)β her cousin. π
and that's the whole page, bestie! πΈ this one's from ./drivers/clk/qcom, dated October 2026 β so mark your calendars, screenshot it, send it to the group chat, whatever you gotta do. π
β¨π
π¦ 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