STRUCT MSM_PINGROUP(9)
πΈ NAME πΈ
struct msm_pingroup β it's the Qualcomm pingroup definition, bestie. Like, the whole blueprint for how one pin group works on those SoCs π
(oh also β hi, you're reading the Kernel API Manual, section 9, and it's struct msm_pingroup time π«Ά)
β¨ SYNOPSIS β¨
struct msm_pingroup {
struct pingroup grp;
unsigned *funcs;
unsigned nfuncs;
u32 ctl_reg;
u32 io_reg;
u32 intr_cfg_reg;
u32 intr_status_reg;
u32 intr_target_reg;
unsigned int tile:2;
unsigned mux_bit:5;
unsigned pull_bit:5;
unsigned drv_bit:5;
unsigned i2c_pull_bit:5;
unsigned od_bit:5;
unsigned egpio_enable:5;
unsigned egpio_present:5;
unsigned oe_bit:5;
unsigned in_bit:5;
unsigned out_bit:5;
unsigned intr_enable_bit:5;
unsigned intr_status_bit:5;
unsigned intr_ack_high:1;
unsigned intr_wakeup_present_bit:5;
unsigned intr_wakeup_enable_bit:5;
unsigned intr_target_bit:5;
unsigned intr_target_width:5;
unsigned intr_target_kpss_val:5;
unsigned intr_raw_status_bit:5;
unsigned intr_polarity_bit:5;
unsigned intr_detection_bit:5;
unsigned intr_detection_width:5;
};
look at her. the bitfields. the u32s. she's thriving β¨ and honestly? she ate. no notes π
π Members π
okay so here's the rundown the page actually gives you, field by field β nothing skipped, no gatekeeping π
grpβ the generic data of the pin group, aka the name and the pins. the vibe check of the struct πΈfuncsβ a list of pinmux functions that can be selected for this group. the index of the selected function is what gets used for programming the function selector. and lowkey important: entries should be indices into the groups list of thestruct msm_pinctrl_soc_dataπctl_regβ offset of the register holding the control bits for this group.io_regβ offset of the register holding the input/output bits for this group.intr_cfg_regβ offset of the register holding the interrupt configuration bits.intr_status_regβ offset of the register holding the status bits for this group.intr_target_regβ offset of the register specifying routing of the interrupts from this group. on most SoCs this register is the same asintr_cfg_reg; leaving this field as zero causes the driver to fall back tointr_cfg_regautomatically. only set this explicitly on older SoCs where the interrupt target routing lives in a separate register (e.g.APQ8064,MSM8960). like, don't be extra for no reason, fr fr πmux_bitβ offset inctl_regfor the pinmux function selection.pull_bitβ offset inctl_regfor the bias configuration.drv_bitβ offset inctl_regfor the drive strength configuration.od_bitβ offset inctl_regfor controlling open drain.oe_bitβ offset inctl_regfor controlling output enable.in_bitβ offset inio_regfor the input bit value.out_bitβ offset inio_regfor the output bit value.intr_enable_bitβ offset inintr_cfg_regfor enabling the interrupt for this group.intr_status_bitβ offset inintr_status_regfor reading and acking the interrupt status.intr_wakeup_present_bitβ offset inintr_target_regspecifying the GPIO can generate wakeup events.intr_wakeup_enable_bitβ offset inintr_target_regto enable wakeup events for the GPIO.intr_target_bitβ offset inintr_target_regfor configuring the interrupt routing.intr_target_widthβ number of bits used for specifying the interrupt routing target.intr_target_kpss_valβ value inintr_target_bitfor specifying that the interrupt from this gpio should get routed to the KPSS processor. sending it home to KPSS πintr_raw_status_bitβ offset inintr_cfg_regfor the raw status bit.intr_polarity_bitβ offset inintr_cfg_regfor specifying the polarity of the interrupt.intr_detection_bitβ offset inintr_cfg_regfor specifying the interrupt type.intr_detection_widthβ number of bits used for specifying the interrupt type. should be2for SoCs that can detect both edges in hardware, otherwise1. that's it, that's the whole rule π¦
π¦ SEE ALSO π¦
go look at the kernel file ./drivers/pinctrl/qcom/pinctrl-msm.h, plus struct msm_gpio_wakeirq_map(9) and struct msm_pinctrl_soc_data(9). iykyk, they're all holding hands π«Ά
and that's the page!! π
β¨ shoutout to the source living its best life in ./drivers/pinctrl/qcom, dated October 2026 β iconic, no cap, see u in the kernel tree bestie ππ
π¦ 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