typec_partne...num_altmodes(9)
β¨ NAME β¨
ok so this page is typec_partne...num_altmodes(9) from the Kernel API Manual (the name got truncated in the header, bestie, but it's typec_partner_set_num_altmodes) β and it does exactly what it says on the tin: it sets the number of available partner altmodes π
πΈ SYNOPSIS πΈ
int typec_partner_set_num_altmodes (struct typec_partner *partner , int
num_altmodes );
π ARGUMENTS π
partnerβ the partner we're updating, like the main character of this whole operation π«Άnum_altmodesβ the number of altmodes we want to specify as available β¨
π¦ DESCRIPTION π¦
so here's the vibe: this routine is used to report the number of alternate modes supported by the partner. that's it, that's the job π
β οΈ and listen β this value is *not* enforced in alternate mode registration routines. like, it's purely a report, no cap. nobody's gonna come check your math at registration time π
partner.num_altmodes is set to -1 on partner registration, which means "a valid value has not been set for it yet" β a lil placeholder era, if you will π
it returns 0 on success or a negative error number on failure. icon behavior, honestly π
π₯ SEE ALSO π₯
okay bestie, buckle up, because this list is long β all of these live in the Kernel file ./drivers/usb/typec/class.c and they're all part of the same typec friend group π
typec_altmode_update_active(9)typec_altmode2port(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_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 whole page, periodt π this lil gem lives in ./drivers/usb/typec, dated October 2026, and yes the manual header and footer both say typec_partne...num_altmodes(9) because even manpages get truncated sometimes π slay π
π¦ 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