]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: typec: class: add typec_get_data_role symbol
authorRD Babiera <rdbabiera@google.com>
Tue, 23 Sep 2025 18:16:07 +0000 (18:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Oct 2025 07:11:50 +0000 (09:11 +0200)
commited4a5c5de56ad4e23c9e5da8981639352b63b8ac
tree1ecd1c58f9e83c43b85626db4e768a065a1963f9
parent924aa1d9e0ae081cf3cb4a378e394f6074da911a
usb: typec: class: add typec_get_data_role symbol

Alt Mode drivers are responsible for sending Enter Mode through the TCPM,
but only a DFP is allowed to send Enter Mode. typec_get_data_role gets
the port's data role, which can then be used in altmode drivers via
typec_altmode_get_data_role to know if Enter Mode should be sent.

Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250923181606.1583584-5-rdbabiera@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/class.c
include/linux/usb/typec.h
include/linux/usb/typec_altmode.h