pch_udc_pcd_get_frame(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– pch_udc_pcd_get_frame πŸ’–

okay so first things first β€” welcome to the Kernel API Manual, bestie πŸŽ€. This little page is all about pch_udc_pcd_get_frame, and honestly? It's short, it's sweet, it does exactly one thing. Let's get into it ✨


🌸 NAME 🌸

pch_udc_pcd_get_frame β€” this API is invoked to get the current frame number πŸ¦‹


✨ SYNOPSIS ✨

int pch_udc_pcd_get_frame (struct usb_gadget *gadget );

Like… that's it. One function, one argument. Lowkey elegant, ngl πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • gadget β€” a reference to the gadget driver πŸ‘‘ that's the whole thing, that's the argument

πŸ’œ DESCRIPTION πŸ’œ

So you call this and it hands you the return codes, and here's the vibe check on those 🌈:

  • 0 β€” Success, we ate, no notes πŸ’–
  • -EINVAL β€” this happens if the gadget passed is NULL 😭 like, you gave it nothing. an empty hand. a void. and it said, respectfully, no.
fr fr, if you're passing in a NULL gadget, that's the case you're gonna hit β€” the manpage is extremely clear on this and so am I 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

the whole extended friend group 🧚 β€” first up, the kernel file where all this lives: ./drivers/usb/gadget/udc/pch_udc.c ⭐

and then the structs, in order, no one left out πŸ’€:

  • struct pch_udc_data_dma_desc(9)
  • struct pch_udc_stp_dma_desc(9)
  • struct pch_udc_cfg_data(9)
  • struct pch_udc_ep(9)
  • struct pch_vbus_gpio_data(9)
  • struct pch_udc_dev(9)
  • struct pch_udc_request(9)

and now the functions, and yes there are a LOT of them, drink some water first πŸ“:

like I said. a whole friend group. iykyk πŸ˜­πŸ’…


and that's the whole page, bestie 🫢 this one came out of ./drivers/usb/gadget/udc, dated October 2026, and honestly it's giving "short king of the kernel API." go get that frame number βœ¨πŸ‘‘πŸ’–

πŸ“¦ where this page comes from