]> git.ipfire.org Git - thirdparty/linux.git/commit
usb: typec: ucsi: Support mode selection to activate altmodes
authorAndrei Kuchynski <akuchynski@chromium.org>
Mon, 19 Jan 2026 13:18:23 +0000 (13:18 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 16:18:01 +0000 (17:18 +0100)
commitab2588c040fe6e87e5b1ca5a0d005cc4df14aced
tree6bfb817e85c84ab0d63f4fbddc92a942dadc1560
parentbe727d4000669a64a3ce6697669150d78bb2d492
usb: typec: ucsi: Support mode selection to activate altmodes

If the ucsi port driver supports modes selection, it should implement
`add_partner_altmodes` and `remove_partner_altmodes` ucsi operations. With
these operations the driver can manage the mode selection process.
Once partner altmodes are registered, `add_partner_altmodes` is called to
start the mode selection. When the partner is unregistered,
`remove_partner_altmodes` is supposed to stop any ongoing processes and
clean up the resources.

`typec_altmode_state_update` informes mode selection about the current mode
of the Type-C connector.

Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260119131824.2529334-7-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h