usb_role_switch_get_drvdata(9)
π usb_role_switch_get_drvdata(9) π
okay bestie, welcome to the Kernel API Manual page for usb_role_switch_get_drvdata(9) β it's giving tiny getter with main character energy, and we're gonna understand it fr fr β¨
πΈ NAME πΈ
usb_role_switch_get_drvdata β Get the private data pointer of a switch π«Ά
like, that's the whole vibe: it gets the private data pointer of a switch. no cap.
π¦ SYNOPSIS π¦
the signature is literally right here, bestie:
void * usb_role_switch_get_drvdata (struct usb_role_switch *sw );
so it returns a void *, and it takes one argument: a pointer to a struct usb_role_switch named sw. iconic, honestly.
π ARGUMENTS π
swβ USB Role Switch. that's the switch you're getting the private data pointer from, iykyk π
π₯ SEE ALSO π₯
if you're going down the USB role switch rabbit hole β and honestly, same β the kernel file to peek at is ./drivers/usb/roles/class.c, and here's the whole related-function squad:
usb_role_switch_set_role(9)usb_role_switch_get_role(9)usb_role_switch_get(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)
xoxo, from ./drivers/usb/roles Β· October 2026 Β· usb_role_switch_get_drvdata(9) out πβ¨
π¦ 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