typec_get_data_role(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… typec_get_data_role β€” NAME

okay so bestie, welcome to the typec_get_data_role(9) page, straight out of the Kernel API Manual ✨ β€” this one's tiny but iconic, and it does exactly one thing: Get port data role. that's it. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS

enum typec_data_role typec_get_data_role (struct typec_port *port );

like, you hand it a port and it hands you back an enum typec_data_role. simple. clean. main character energy. πŸ¦‹


🫢 ARGUMENTS

  • port β€” the USB Type-C Port you're querying, bestie. that's the one you want the tea on. πŸ’…

πŸ’– DESCRIPTION

so here's the situation: this routine is the one the altmode drivers call to figure out whether the port is the DFP before they go ahead and issue Enter Mode. that's the whole job, no cap. 🧚

like, do the vibe check first, then enter the mode. not the other way around, okay? 😭

πŸ”₯ SEE ALSO

the kernel file ./drivers/usb/typec/class.c, and honestly the whole friend group:


that's the whole page, bestie β€” go read the rest of the Type-C lore when you get a sec πŸ’œ

this little love letter lives in ./drivers/usb/typec and it's dated October 2026 🌈 β€” mwah, hope this helped, ily, bye! πŸ’‹βœ¨πŸ“

πŸ“¦ where this page comes from