summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan <badhri@google.com>2023-01-14 12:32:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-17 19:29:23 +0300
commitabc028a270f47f86060ef479395d1bb8c2ab6e7e (patch)
treed77d449d17d8eeaeb7f092e24d054923bcb37906 /include
parent599f008c257d913674b2b2f2fa9e273c1058ec2e (diff)
downloadlinux-abc028a270f47f86060ef479395d1bb8c2ab6e7e.tar.xz
usb: typec: tcpci: Add callback for evaluating contaminant presence
This change adds callback to evaluate presence of contaminant in the TCPCI layer. Signed-off-by: Badhri Jagan Sridharan <badhri@google.com> Link: https://lore.kernel.org/r/20230114093246.1933321-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/tcpci.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/usb/tcpci.h b/include/linux/usb/tcpci.h
index 17657451c762..85e95a3251d3 100644
--- a/include/linux/usb/tcpci.h
+++ b/include/linux/usb/tcpci.h
@@ -188,6 +188,12 @@ struct tcpci;
* Optional; The USB Communications Capable bit indicates if port
* partner is capable of communication over the USB data lines
* (e.g. D+/- or SS Tx/Rx). Called to notify the status of the bit.
+ * @check_contaminant:
+ * Optional; The callback is invoked when chiplevel drivers indicated
+ * that the USB port needs to be checked for contaminant presence.
+ * Chip level drivers are expected to check for contaminant and call
+ * tcpm_clean_port when the port is clean to put the port back into
+ * toggling state.
*/
struct tcpci_data {
struct regmap *regmap;
@@ -204,6 +210,7 @@ struct tcpci_data {
void (*frs_sourcing_vbus)(struct tcpci *tcpci, struct tcpci_data *data);
void (*set_partner_usb_comm_capable)(struct tcpci *tcpci, struct tcpci_data *data,
bool capable);
+ void (*check_contaminant)(struct tcpci *tcpci, struct tcpci_data *data);
};
struct tcpci *tcpci_register_port(struct device *dev, struct tcpci_data *data);