STRUCT USB_OTG_CAPS(9)
π 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.0shows up as0200Hβ yes really, that's the encoding, iykyk). πhnp_supportβ indicates if the device supports HNP. a simple lil yes-or-no, she's abool. β¨srp_supportβ indicates if the device supports SRP. again:bool, again: iconic. π₯adp_supportβ indicates if the device supports ADP. last one, also abool, and yeah we're keeping all three, don't skip 'em. π
bestie note: three of these are justboolflags saying "yes I support this / no I don't", so the actual personality of the struct is mostly living inotg_revand its BCD moment. π«Ά
π¦ SEE ALSO π¦
- Kernel file
./include/linux/usb/otg.h usb_get_dr_mode(9)
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
- 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