typec_altmode2port(9)
π typec_altmode2port π
okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is typec_altmode2port β literally the glow-up that turns an Alternate Mode into a USB Type-C port π¦
πΈ NAME πΈ
typec_altmode2port β Alternate Mode to USB Type-C port. that's the whole vibe, no cap β¨
π SYNOPSIS π
struct typec_port * typec_altmode2port (struct typec_altmode *alt );
π ARGUMENTS π
altβ The Alternate Mode. yeah that's it, that's the whole argument, she's lowkey simple like that π«Ά
β¨ DESCRIPTION β¨
Returns a handle to the port that a cable plug or partner with alt is connected to. so you hand it an Alternate Mode, it hands you back the port that thing is plugged into β it's giving matchmaker energy fr fr π₯
π SEE ALSO π
okay this is the group chat, and everyone's invited. Kernel file ./drivers/usb/typec/class.c β go read it, iykyk π
typec_altmode_update_active(9)typec_altmode_set_ops(9)typec_unregister_altmode(9)typec_partner_set_usb_mode(9)typec_partner_set_identity(9)typec_partner_set_pd_revision(9)typec_partner_set_usb_power_delivery(9)typec_partner_set_num_altmodes(9)typec_partner_register_altmode(9)typec_partner_set_svdm_version(9)typec_partner_usb_power_delivery_register(9)typec_register_partner(9)typec_unregister_partner(9)typec_plug_set_num_altmodes(9)typec_plug_register_altmode(9)typec_register_plug(9)typec_unregister_plug(9)typec_cable_get(9)typec_cable_put(9)typec_cable_is_active(9)typec_cable_altmode_unsupported(9)typec_cable_set_identity(9)typec_register_cable(9)typec_unregister_cable(9)typec_port_set_usb_mode(9)typec_port_set_usb_power_delivery(9)typec_set_data_role(9)typec_get_data_role(9)typec_set_pwr_role(9)typec_set_vconn_role(9)typec_set_pwr_opmode(9)typec_find_pwr_opmode(9)typec_find_orientation(9)typec_find_port_power_role(9)typec_find_power_role(9)typec_find_port_data_role(9)typec_set_orientation(9)typec_get_orientation(9)typec_set_mode(9)typec_get_negotiated_svdm_version(9)typec_get_cable_svdm_version(9)typec_cable_set_svdm_version(9)typec_get_drvdata(9)typec_port_register_altmode(9)typec_port_register_cable_ops(9)typec_register_port(9)typec_unregister_port(9)
and that's the page!! mwah π so this little icon of a manpage comes to you straight from ./drivers/usb/typec, dated October 2026, living in section 9 of the Kernel API Manual. go forth and get that port handle, bestie ππ
π¦ 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