usb_get_dr_mode_from_string(9)
π 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 π
usb_ep_type_string(9)usb_otg_state_string(9)usb_speed_string(9)usb_get_maximum_speed(9)usb_get_maximum_ssp_rate(9)usb_state_string(9)usb_get_role_switch_default_mode(9)usb_decode_interval(9)of_usb_get_dr_mode_by_phy(9)of_usb_host_tpl_support(9)of_usb_update_otg_caps(9)usb_of_get_companion_dev(9)
mwah π β this one's from the ./drivers/usb/common source/version, dated October 2026 π«Ά
π¦ 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