regulator_ena_gpio_ctrl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the regulator_ena_gpio_ctrl(9) page from the Kernel API Manual 🫢 this one is literally about balancing the enable_count of each GPIO and actual GPIO pin control, and it's giving very specific energy. let's go πŸ’…

πŸ’– NAME πŸ’–

regulator_ena_gpio_ctrl β€” balance enable_count of each GPIO and actual GPIO pin control. no cap, that's the whole name vibe. πŸŽ€

✨ SYNOPSIS ✨

int regulator_ena_gpio_ctrl (struct regulator_dev *rdev , bool enable );

so you're calling it with a struct regulator_dev *rdev and a bool enable, and it hands you back an int. iconic signature tbh. πŸ’œ

πŸŽ€ ARGUMENTS πŸŽ€

  • rdev β€” the regulator_dev structure. that's the main character here. πŸ‘‘
  • enable β€” enable GPIO at initial use? yep, that's the question it's asking. πŸ¦‹

πŸ¦‹ DESCRIPTION πŸ¦‹

here's the lowkey important part, bestie: GPIO is enabled in case of initial use. (enable_count is 0) and GPIO is disabled when it is not shared any more. (enable_count <= 1). that's the whole behavior, no extra lore. ✨

🌸 RETURN 🌸

0 on success or a negative error number on failure. simple, clean, fr fr. 🫢

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/regulator/core.c and the whole bestie squad of references:

okay that's the whole page, mwah πŸ’‹ β€” source/version: ./drivers/regulator, date: October 2026, and the page is regulator_ena_gpio_ctrl(9). bye bestie, go balance those GPIOs responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from