usb_gadget_vbus_disconnect(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– usb_gadget_vbus_disconnect(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual page for usb_gadget_vbus_disconnect(9) β€” this is the one that tells the controller β€œhey, the VBUS party is OVER” πŸŽ‰πŸš« and honestly? iconic.


✨ NAME ✨

usb_gadget_vbus_disconnect β€” notify controller about VBUS session end πŸ’…


🌸 SYNOPSIS 🌸

int usb_gadget_vbus_disconnect (struct usb_gadget *gadget );

πŸŽ€ ARGUMENTS πŸŽ€

  • gadget β€” the device whose VBUS supply is being described. like, this is the gadget we're talking about, bestie 🫢

πŸ¦‹ CONTEXT πŸ¦‹

okay so important vibe check: this one can sleep. literally, it's allowed to nap πŸ˜΄πŸ’€ so keep that in mind when you're deciding where to call it from, bestie. no cap.


⭐ DESCRIPTION ⭐

so here's the tea β˜• β€” this call is used by a driver for an external transceiver (or GPIO) that detects a VBUS power session ending. basically the physical layer is like β€œwe're done here” and this function carries that message to the controller πŸ¦‹

common responses include reversing everything done in usb_gadget_vbus_connect β€” like, undo the whole fit, periodt πŸ’…βœ¨

returns zero on success, else negative errno β€” so if you get a negative number back, something went sideways and it's giving error energy 😭


πŸ”₯ SEE ALSO πŸ”₯

okay this list is LONG but we're not skipping a single one, bestie β€” every reference stays, fr fr:


and that's the whole page, bestie 🫢 this gem comes from ./drivers/usb/gadget/udc, October 2026, and it's filed under usb_gadget_vbus_disconnect(9) β€” go forth and disconnect that VBUS with confidence πŸ’…βœ¨

πŸ“¦ where this page comes from