STRUCT PMIC_GPIO_PAD(9)
π 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 tofalsewhen the GPIO should be put in high Z state. sofalse= "girl's not driving anything rn", ok?? πout_valueβ the cached pin output value. she remembers what you last told her. π§have_bufferβ set totrueif the GPIO output could be configured in push-pull, open-drain or open-source mode. if this isfalse, don't even ask her to pick a buffer mode, it's not happening πoutput_enabledβ set totrueif GPIO output logic is enabled. π₯input_enabledβ set totrueif GPIO input buffer logic is enabled. β¨analog_passβ set totrueif the GPIO is in analog-pass-through mode. letting it all flow through, main character energy tbh πlv_mv_typeβ set totrueif the GPIO subtype isGPIO_LV(0x10)orGPIO_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β seepmic_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_enabledbeingfalsemeans 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
- 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