STRUCT PMIC_GPIO_PAD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

struct pmic_gpio_pad β€” the little guy that keeps your current GPIO settings, bestie πŸ’–


✨ SYNOPSIS ✨

okay so here's the whole struct, no cap, every field exactly as it lives:

struct pmic_gpio_pad {
    u16 base;
    bool is_enabled;
    bool out_value;
    bool have_buffer;
    bool output_enabled;
    bool input_enabled;
    bool analog_pass;
    bool lv_mv_type;
    unsigned int    num_sources;
    unsigned int    power_source;
    unsigned int    buffer_type;
    unsigned int    pullup;
    unsigned int    strength;
    unsigned int    function;
    unsigned int    atest;
    unsigned int    dtest_buffer;
 };

like… she's giving "small struct, big responsibilities" and honestly? iconic. πŸ‘‘


πŸŽ€ Members πŸŽ€

here's the vibe check on every single field, one by one, no skipping, we don't do that here 🫢

  • base β€” the address base in the SPMI device. like, where she lives. 🏠
  • is_enabled β€” gets set to false when the GPIO should be put in high Z state. so false = "girl's not driving anything rn", ok?? 😭
  • out_value β€” the cached pin output value. she remembers what you last told her. 🧠
  • have_buffer β€” set to true if the GPIO output could be configured in push-pull, open-drain or open-source mode. if this is false, don't even ask her to pick a buffer mode, it's not happening πŸ™ˆ
  • output_enabled β€” set to true if GPIO output logic is enabled. πŸ”₯
  • input_enabled β€” set to true if GPIO input buffer logic is enabled. ✨
  • analog_pass β€” set to true if the GPIO is in analog-pass-through mode. letting it all flow through, main character energy tbh 🌊
  • lv_mv_type β€” set to true if the GPIO subtype is GPIO_LV(0x10) or GPIO_MV(0x11). lowkey a little name-tag check πŸ’…
  • num_sources β€” number of power-sources supported by this GPIO. how many vibes she can plug into ⚑
  • power_source β€” the current power-source used. which one she's running on rn πŸ”Œ
  • buffer_type β€” push-pull, open-drain or open-source. the whole personality of the output πŸ¦‹
  • pullup β€” constant current which flow trough GPIO output buffer. yes that's the original wording of the concept, we're keeping it, she pulls πŸ”₯
  • strength β€” No, Low, Medium, High. literally a slider, pick your fighter πŸ’ͺ
  • function β€” see pmic_gpio_functions[]. she has a whole roster, go look πŸ‘€
  • atest β€” the ATEST selection for GPIO analog-pass-through mode. πŸ§ͺ
  • dtest_buffer β€” the DTEST buffer selection for digital input mode. 🎯
friendly reminder bestie: is_enabled being false means high Z state β€” that's the "hands off, I'm not driving this" setting, not a bug, don't come for her πŸ’€

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/pinctrl/qcom/pinctrl-spmi-gpio.c β€” go read the source, iykyk πŸ“–πŸ’œ

and that's the whole page fr fr πŸŽ€ this lil rewrite came from the ./drivers/pinctrl/qcom source/version, dated October 2026, and it's all about struct pmic_gpio_pad(9) β€” slay, go configure some pins, mwah 🫢⭐

πŸ“¦ where this page comes from