usb_get_dr_mode_from_string(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ usb_get_dr_mode_from_string(9) πŸ‘‘

okay bestie, welcome to the Kernel API Manual πŸ’– we're looking at usb_get_dr_mode_from_string(9) today, and it's giving very specific little lookup-function energy ✨


πŸ’– NAME πŸ’–

usb_get_dr_mode_from_string β€” get the dual role mode for a given string, periodt πŸ’…

🌸 SYNOPSIS 🌸

here's the signature, literally in all its code-y glory:

enum usb_dr_mode usb_get_dr_mode_from_string (const char *str );

πŸŽ€ ARGUMENTS πŸŽ€

  • str β€” the string you want to find the corresponding dual role mode for πŸ”Ž

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function performs a lookup for the string you handed it, and it returns the corresponding enum usb_dr_mode. iconic behavior, honestly ✨

then it says: if no match for the string could be found,

and bestie, the source sentence literally stops there after the comma 😭 no extra ending, no cap. I'm not gonna invent the rest and pretend it's facts 🫠

πŸ’œ SEE ALSO πŸ’œ

Kernel file: ./drivers/usb/common/common.c β€” that's where this lives, iykyk πŸ“

the reference circle is giving USB-string decoder friend group realness 🌈


mwah πŸ’‹ β€” this one's from the ./drivers/usb/common source/version, dated October 2026 🫢

πŸ“¦ where this page comes from