find_pxa_ep(9)
π 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 vibeudc_usb_epβ theudc_usb_epstructure, 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
UDCCRregister'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_udcstructure. 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:
is_match_usb_pxa(9)update_pxa_ep_matches(9)pio_irq_enable(9)pio_irq_disable(9)udc_set_mask_UDCCR(9)udc_clear_mask_UDCCR(9)ep_write_UDCCSR(9)ep_count_bytes_remain(9)ep_is_empty(9)ep_is_full(9)epout_has_pkt(9)set_ep0state(9)ep0_idle(9)inc_ep_stats_reqs(9)inc_ep_stats_bytes(9)pxa_ep_setup(9)pxa_eps_setup(9)pxa_ep_alloc_request(9)pxa_ep_free_request(9)ep_add_request(9)ep_del_request(9)req_done(9)ep_end_out_req(9)ep0_end_out_req(9)ep_end_in_req(9)ep0_end_in_req(9)nuke(9)read_packet(9)write_packet(9)read_fifo(9)write_fifo(9)read_ep0_fifo(9)write_ep0_fifo(9)pxa_ep_queue(9)pxa_ep_dequeue(9)pxa_ep_set_halt(9)pxa_ep_fifo_status(9)pxa_ep_fifo_flush(9)pxa_ep_enable(9)pxa_ep_disable(9)dplus_pullup(9)pxa_udc_get_frame(9)pxa_udc_wakeup(9)should_enable_udc(9)should_disable_udc(9)pxa_udc_pullup(9)pxa_udc_vbus_session(9)pxa_udc_vbus_draw(9)pxa_udc_phy_event(9)udc_disable(9)udc_init_data(9)udc_enable(9)pxa27x_udc_start(9)stop_activity(9)pxa27x_udc_stop(9)handle_ep0_ctrl_req(9)handle_ep0(9)handle_ep(9)pxa27x_change_configuration(9)pxa27x_change_interface(9)irq_udc_suspend(9)irq_udc_resume(9)irq_udc_reconfig(9)irq_udc_reset(9)pxa_udc_irq(9)pxa_udc_probe(9)pxa_udc_remove(9)pxa_udc_suspend(9)pxa_udc_resume(9)
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
- 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