find_pxa_ep(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… find_pxa_ep(9) β€” the kernel API manual, bestie edition

okay so real talk, this one lives in the kernel API manual and it's called find_pxa_ep and it's lowkey doing a little matchmaking service for USB endpoints πŸ’–


✨ NAME ✨

find_pxa_ep β€” finds the pxa_ep structure that matches a udc_usb_ep 🫢


🌸 SYNOPSIS 🌸

struct pxa_ep * find_pxa_ep (struct pxa_udc *udc , struct udc_usb_ep
*udc_usb_ep );

like yes she returns a struct pxa_ep *, we love a pointer-returning icon πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • udc β€” the pxa udc, that's the whole device controller vibe
  • udc_usb_ep β€” the udc_usb_ep structure, the one we're tryna find a match for

πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is she takes udc_usb_ep and matches it against all the available pxa_eps, checking to see if one of them matches. that's it, that's the whole job, no cap ✨

and honestly this is necessary because the pxa hardware has a strong restriction, like not a cute little preference, a whole restriction: once pxa endpoints are initialized, their configuration is freezed 🧊 and you literally cannot change their address, their direction, or which configuration / interface / altsetting they're active in. periodt.

which is, um, very different from the more usual models where endpoints are roughly just addressable fifos and all the configuration events get left up to the gadget drivers (like all control messages). so yeah, different vibe entirely πŸ™ˆ

also note there's still a blurred point here, and we're being honest about it:

  • we rely on the UDCCR register's "active interface" and "active altsetting". this is a nonsense in regard of the USB spec, where multiple interfaces are active at the same time πŸ’€
  • if we knew for sure that the pxa can handle multiple interface at the same time, assuming Intel's Developer Guide is wrong, this function should be reviewed, and a cache of couples (iface, altsetting) should be kept in the pxa_udc structure. in this case this function would match against the cache of couples instead of the "last altsetting" set up πŸ”₯

Returns the matched pxa_ep structure or NULL if none found 😭 (sad girl hours if it's NULL tbh)


πŸ’œ SEE ALSO πŸ’œ

so there's kind of a lot here, the whole friend group showed up 🌈 the kernel file is ./drivers/usb/gadget/udc/pxa27x_udc.c and the guest list is:

like I said. the whole group chat πŸ’€


okay that's the page!! this one's from ./drivers/usb/gadget/udc, October 2026, and I'm gonna sign off now β€” stay matching, bestie, and may your return value never be NULL πŸ§šπŸ’–βœ¨

πŸ“¦ where this page comes from