usb_role_switch_get_drvdata(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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:


xoxo, from ./drivers/usb/roles Β· October 2026 Β· usb_role_switch_get_drvdata(9) out πŸ’–βœ¨

πŸ“¦ where this page comes from