typec_altmode_set_ops(9)
π typec_altmode_set_ops(9) β ok bestie, let's talk ops β¨
So this is a page straight out of the Kernel API Manual, and it's about handing an alternate mode its ops. Short page, big vibes, zero cap.
πΈ NAME πΈ
typec_altmode_set_ops β literally just sets the ops for an altmode. That's it. That's the whole job. π
β¨ SYNOPSIS β¨
void typec_altmode_set_ops (struct typec_altmode *adev , const struct
typec_altmode_ops *ops );
No return value, no drama, void and out. π
π¦ ARGUMENTS π¦
adevβ the handle to the alternate mode π«Ά like, this is the altmode you're doing stuff to.opsβ the ops for the alternate mode π the actual operations bundle getting attached.
π DESCRIPTION π
Okay so hear me out: after you set the ops, attribute visibility needs to be refreshed if the alternate mode can be activated. Not always β just when it can be activated. That's the whole caveat, don't skip it, fr fr. π
Like, setting the ops is not the last step bestie. Visibility refresh is the encore. π
π SEE ALSO π
Everything is in the kernel file ./drivers/usb/typec/class.c β go read it, iykyk. And here's the whole friend group, no one left out:
typec_altmode_update_active(9)typec_altmode2port(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)
ok that's the whole page, slay π β¨
Big kiss goodbye from the ./drivers/usb/typec corner of the kernel, dated October 2026 β go forth and set those ops, 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