usb: typec: tcpci: add cable_comm_capable attribute
authorRD Babiera <rdbabiera@google.com>
Mon, 8 Jan 2024 19:16:16 +0000 (19:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jan 2024 01:38:25 +0000 (17:38 -0800)
commit59cd27a0cab1ceddcc4251309fd3643921ed9ab9
treed79a6af30ad2725663d24753ec3b5aea24e44f91
parent231b7318413cef0f8e5c2ca8db1a95b666c25d70
usb: typec: tcpci: add cable_comm_capable attribute

Add cable_comm_capable to tcpci_data for tcpci drivers to indicate that
the port tcpc is capable of communicating to cables over SOP. A
corresponding tcpci callback tcpci_cable_comm_capable returns this value.
The tcpm will primarily use this in later patches to determine if the port
can transmit and receive SOP' messages.

Maxim based tcpci drivers are capable of SOP' communication, so the
cable_comm_capable flag is set to true.

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