STRUCT CLK_GPIO(9)
πΈ struct clk_gpio(9) πΈ
okay bestie, welcome to the Kernel API Manual π
this one's all about struct clk_gpio β the gpio gated clock, and it's literally iconic for reasons we're about to get into π
β¨ NAME β¨
struct clk_gpio β gpio gated clock, no cap π«Ά
π¦ SYNOPSIS π¦
struct clk_gpio {
struct clk_hw hw;
struct gpio_desc *gpiod;
};
π Members π
hwβ the handle between common and hardware-specific interfaces, the little bridge energy we love to see πgpiodβ the gpio descriptor, aka the gpio's main character paperwork π
πΈ Description πΈ
so basically this is a clock with a gpio control, right? it uses that gpio to enable and disable the parent clock or to switch between two parents by asserting or deasserting the gpio π₯ the way it just flips a pin and the whole clock situation changes? obsessed.
it implements .enable, .disable and .is_enabled or .get_parent, .set_parent and .determine_rate β and which set you get depends on which clk_ops is used, iykyk π
π SEE ALSO π
- Kernel file
./drivers/clk/clk-gpio.cβ basic gpio gated clock which can be enabled and disabled(9) π¦ - basic clock multiplexer which can be controlled with a gpio output(9) β
- gated fixed clock, controlled with a gpio output and a regulator(9) π
struct clk_gated_fixed(9)π
and that's the whole vibe, bestie β go forth and gate those clocks π
this page lives in ./drivers/clk and it's dated October 2026 β see you in the source tree, 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