STRUCT USB_OTG_CAPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so this is a page straight outta the Kernel API Manual, and it's about a lil struct named struct usb_otg_caps β€” it literally describes the otg capabilities of the device, no cap. Think of it as the vibe check card your USB device hands over so everyone knows what OTG tricks it can pull. πŸ¦‹


✨ SYNOPSIS ✨

here's the whole thing, and yes you're gonna want to copy it exactly:

struct usb_otg_caps {
    u16 otg_rev;
    bool hnp_support;
    bool srp_support;
    bool adp_support;
};

four fields, that's it, she's lowkey minimal and I respect it πŸŽ€


🌸 Members 🌸

  • otg_rev β€” this is the OTG revision number that the device is compliant with, and the way it's stored is binary-coded decimal (so like, 2.0 shows up as 0200H β€” yes really, that's the encoding, iykyk). πŸ’œ
  • hnp_support β€” indicates if the device supports HNP. a simple lil yes-or-no, she's a bool. ✨
  • srp_support β€” indicates if the device supports SRP. again: bool, again: iconic. πŸ”₯
  • adp_support β€” indicates if the device supports ADP. last one, also a bool, and yeah we're keeping all three, don't skip 'em. πŸ‘‘
bestie note: three of these are just bool flags saying "yes I support this / no I don't", so the actual personality of the struct is mostly living in otg_rev and its BCD moment. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹


okay go read that header file, it's giving main character energy fr fr πŸ˜­πŸ’–

and that's the whole page! source/version is ./include/linux/usb, dated October 2026, and the page itself is struct usb_otg_caps(9) β€” mwah, slay, periodt πŸ’…πŸŒˆ

πŸ“¦ where this page comes from