usb_role_switch_get(9)
okay so welcome to usb_role_switch_get(9), brought to you by the Kernel API Manual π bestie, this one is short and sweet, and itβs literally about finding the USB role switch linked with the caller. slay. β¨
π NAME π
usb_role_switch_get β Find USB role switch linked with the caller π
π¦ SYNOPSIS π¦
struct usb_role_switch * usb_role_switch_get (struct device *dev );
π«Ά ARGUMENTS π«Ά
devβ the caller device. thatβs the whole argument, bestie, and itβs giving main character energy π
πΈ DESCRIPTION πΈ
It finds and returns the role switch linked with dev. The reference count for the found switch is incremented β so yeah, the refcount goes up, no cap. π¦β¨
π SEE ALSO π
Kernel file: ./drivers/usb/roles/class.c π
usb_role_switch_set_role(9)usb_role_switch_get_role(9)fwnode_usb_role_switch_get(9)usb_role_switch_put(9)usb_role_switch_find_by_fwnode(9)usb_role_switch_register(9)usb_role_switch_unregister(9)usb_role_switch_set_drvdata(9)usb_role_switch_get_drvdata(9)
okay bye bestie π this page is from source/version ./drivers/usb/roles, dated October 2026, and itβs usb_role_switch_get(9) β mwah, take care of those refcounts ππ
π¦ 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