STRUCT CLK_GPIO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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