pch_udc_pcd_selfpowered(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pch_udc_pcd_selfpowered (9) β€” Kernel API Manual, bestie edition ✨

okay so picture this: you're deep in the pch_udc USB gadget driver, it's giving kernel-internals realness, and this little function is the one whose whole entire job is to say whether the device is self powered or not. that's it. that's the gig. and honestly?? iconic of it. πŸŽ€


🌸 NAME 🌸

pch_udc_pcd_selfpowered β€” This API is invoked to specify whether the device is self powered or not πŸ’–


✨ SYNOPSIS ✨

int pch_udc_pcd_selfpowered (struct usb_gadget *gadget , int value );

like yes bestie, that's the whole signature, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gadget β€” Reference to the gadget driver. you know, the whole gadget situation. the main character of the operation ngl.
  • value β€” Specifies self powered or not. that's the vibe check right there β€” it's literally telling everyone what your power situation is πŸ’…

🌈 DESCRIPTION 🌈

okay so this is the return-code menu, and it is short but every bit matters, so pay attention bestie:

  • 0 β€” Success πŸŽ‰ (yes queen, it worked)
  • -EINVAL β€” If the gadget passed is NULL 😭 (you handed it nothing. it said no.)
fr fr though β€” if you pass a NULL gadget you are getting -EINVAL back and that is not a drill πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/usb/gadget/udc/pch_udc.c β€” and now the full friend group, nobody left out, periodt:


that's the whole page bestie, you ate it up πŸ’œ and before you go β€” this little beauty lives in ./drivers/usb/gadget/udc, dated October 2026, and it's filed under pch_udc_pcd_selfpowered(9) so you can find it again whenever you need her πŸ§šβ€β™€οΈβ­

πŸ“¦ where this page comes from