STRUCT PXA_UDC(9)
π¦ NAME π¦
ok so this is struct pxa_udc(9) from the Kernel API Manual, and bestie, it's literally the udc structure. like, the whole thing. the main character struct itself. periodt π
β¨ SYNOPSIS β¨
here's the glow-up, laid out exactly how the kernel gods wrote it:
struct pxa_udc {
void __iomem *regs;
int irq;
struct clk *clk;
struct usb_gadget gadget;
struct usb_gadget_driver *driver;
struct device *dev;
struct gpio_desc *gpiod;
struct usb_phy *transceiver;
enum ep0_state ep0state;
struct udc_stats stats;
struct udc_usb_ep
udc_usb_ep[NR_USB_ENDPOINTS];
struct pxa_ep pxa_ep[NR_PXA_ENDPOINTS];
unsigned enabled:1;
unsigned pullup_on:1;
unsigned pullup_resume:1;
unsigned vbus_sensed:1;
unsigned config:2;
unsigned last_interface:3;
unsigned last_alternate:3;
#ifdef CONFIG_PM;
unsigned udccsr0;
#endif;
};
ngl that one line that just goesstruct udc_usb_epand then dropsudc_usb_ep[NR_USB_ENDPOINTS];on the next line is so real of it. we respect the formatting choices here π«Ά
π Members π
okay, field-by-field tour, no skips, no cap:
regsβ mapped IO space β¨irqβ udc irqclkβ udc clockdriverβ bound gadget (zero,g_ether,g_mass_storage, ...) β yeah, the whole little gadget fam πdevβ devicegpiodβ gpio descriptor of gpio for D+ pullup (orNULLif none)transceiverβ external transceiver to handle vbus sense and D+ pullupep0stateβ control endpoint state machine statestatsβ statistics on udc usageudc_usb_epβ array of usb endpoints offered by the gadgetpxa_epβ array of pxa available endpointsenabledβ UDC was enabled by a previousudc_enablepullup_onβ if pullup resistor connected to D+ pinpullup_resumeβ if pullup resistor should be connected to D+ pin on resumeconfigβ UDC active configurationlast_interfaceβ UDC interface of the lastSET_INTERFACEhost requestlast_alternateβ UDC altsetting of the lastSET_INTERFACEhost requestudccsr0β save ofudccsr0in case of suspend π΄
also lowkey living for the bitfield energy onenabled:1,pullup_on:1,pullup_resume:1,vbus_sensed:1,config:2,last_interface:3,last_alternate:3β tiny numbers, huge vibes π§
π₯ SEE ALSO π₯
go peek at the kernel file ./drivers/usb/gadget/udc/pxa27x_udc.h and its friends: struct udc_usb_ep(9), struct pxa_ep(9), struct pxa27x_request(9). iykyk π
and that's the whole page bestie, slay ππ β straight out of ./drivers/usb/gadget/udc, dated October 2026, filed under struct pxa_udc(9). go off, king πβ¨
π¦ 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