STRUCT MSM_PINCTRL(9)
π struct msm_pinctrl(9) π
okay bestie, welcome to the Kernel API Manual β¨ β today's main character is struct msm_pinctrl, and she is literally the whole vibe of a pinctrl-msm device. no cap, this is the state struct, the group chat of everything that pin controller needs to remember. iykyk π
πΈ NAME πΈ
struct msm_pinctrl β state for a pinctrl-msm device π¦ (yes, that's it, that's her whole job description, and she ate)
β¨ SYNOPSIS β¨
struct msm_pinctrl {
struct device *dev;
struct pinctrl_dev *pctrl;
struct gpio_chip chip;
struct pinctrl_desc desc;
int irq;
bool intr_target_use_scm;
raw_spinlock_t lock;
unsigned long dual_edge_irqs[BITS_TO_LONGS( MAX_NR_GPIO)];
unsigned long enabled_irqs[BITS_TO_LONGS( MAX_NR_GPIO)];
unsigned long skip_wake_irqs[BITS_TO_LONGS( MAX_NR_GPIO)];
unsigned long disabled_for_mux[BITS_TO_LONGS( MAX_NR_GPIO)];
unsigned long ever_gpio[BITS_TO_LONGS( MAX_NR_GPIO)];
const struct msm_pinctrl_soc_data *soc;
void __iomem *regs[MAX_NR_TILES];
u32 phys_base[MAX_NR_TILES];
};
look at all those unsigned long bitmaps bestie, it's giving organized chaos and honestly? obsessed π
π Members π
devβ device handle. the actual device she's attached to, standard issue π«Άpctrlβ pinctrl handle. her pinctrl half, keeping it together πchipβ gpiochip handle. the gpio side of the situation πdescβ pin controller descriptor. literally the descriptor, no notes, slayirqβ parent irq for the TLMM irq_chip π₯intr_target_use_scmβ when this is set, route irq to application cpu using scm calls βlockβ Spinlock to protect register resources as well as msm_pinctrl data structures. yes she has a lock, she's not reckless πdual_edge_irqsβ Bitmap of irqs that need sw emulated dual edge detection π (done in software, because the hardware said "not my problem")enabled_irqsβ Bitmap of currently enabled irqs β¨skip_wake_irqsβ Skip IRQs that are handled by wakeup interrupt controller πdisabled_for_muxβ These IRQs were disabled because we muxed away. classic muxing betrayal πever_gpioβ This bit is set the first time we mux a pin togpio_func. it's a "first time" bit, lowkey sentimental πsocβ Reference tosoc_dataof platform specific data. platform-specific tea βregsβ Base addresses for the TLMM tiles π§phys_baseβ Physical base address π
π SEE ALSO π
- Kernel file
./drivers/pinctrl/qcom/pinctrl-msm.cβ go read the source bestie, it's right there π¦ msm_gpio_update_dual_edge_parent(9)β her friend, also iconic π
a gentle reminder: the lock field exists for a reason β it protects register resources and the msm_pinctrl data structures. do not disrespect the spinlock, fr fr π
that's the whole tour bestie, thanks for coming to my ted talk π this page came to you from ./drivers/pinctrl/qcom, dated October 2026, and it's filed under struct msm_pinctrl(9) β periodt. π
πβ¨
π¦ 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