summaryrefslogtreecommitdiff
path: root/include/linux/usb/tcpm.h
diff options
context:
space:
mode:
authorRD Babiera <rdbabiera@google.com>2024-01-08 19:16:16 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-27 17:38:25 -0800
commit59cd27a0cab1ceddcc4251309fd3643921ed9ab9 (patch)
treed79a6af30ad2725663d24753ec3b5aea24e44f91 /include/linux/usb/tcpm.h
parent231b7318413cef0f8e5c2ca8db1a95b666c25d70 (diff)
downloadlwn-59cd27a0cab1ceddcc4251309fd3643921ed9ab9.tar.gz
lwn-59cd27a0cab1ceddcc4251309fd3643921ed9ab9.zip
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>
Diffstat (limited to 'include/linux/usb/tcpm.h')
-rw-r--r--include/linux/usb/tcpm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/tcpm.h b/include/linux/usb/tcpm.h
index 65fac5e1f317..430fa3ec69bb 100644
--- a/include/linux/usb/tcpm.h
+++ b/include/linux/usb/tcpm.h
@@ -119,6 +119,9 @@ enum tcpm_transmit_type {
* at the end of the deboumce period or when the port is still
* toggling. Chip level drivers are expected to check for contaminant
* and call tcpm_clean_port when the port is clean.
+ * @cable_comm_capable
+ * Optional; Returns whether cable communication over SOP' is supported
+ * by the tcpc
*/
struct tcpc_dev {
struct fwnode_handle *fwnode;
@@ -154,6 +157,7 @@ struct tcpc_dev {
bool (*is_vbus_vsafe0v)(struct tcpc_dev *dev);
void (*set_partner_usb_comm_capable)(struct tcpc_dev *dev, bool enable);
void (*check_contaminant)(struct tcpc_dev *dev);
+ bool (*cable_comm_capable)(struct tcpc_dev *dev);
};
struct tcpm_port;