diff options
author | Badhri Jagan Sridharan <badhri@google.com> | 2023-01-14 10:32:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-17 17:29:23 +0100 |
commit | 02b332a06397ef213790f9561c9c022ce1af1a97 (patch) | |
tree | 502d06def7b939c97bf7cfa2a816efa64f3dffac /drivers/usb/cdns3/cdnsp-gadget.h | |
parent | usb: typec: tcpci: Add callback for evaluating contaminant presence (diff) | |
download | linux-02b332a06397ef213790f9561c9c022ce1af1a97.tar.xz linux-02b332a06397ef213790f9561c9c022ce1af1a97.zip |
usb: typec: maxim_contaminant: Implement check_contaminant callback
Maxim TCPC has additional ADCs and low current(1ua) current source
to measure the impedance of CC and SBU pins. When tcpm invokes
the check_contaminant callback, Maxim TCPC measures the impedance
of the CC & SBU pins and when the impedance measured is less than
1MOhm, it is assumed that USB-C port is contaminated. CC comparators
are also checked to differentiate between presence of sink and
contaminant. Once USB-C is deemed to be contaminated, MAXIM TCPC
has additional hardware to disable normal DRP toggling cycle and
enable 1ua on CC pins once every 2.4secs/4.8secs. Maxim TCPC
interrupts AP once the impedance on the CC pin is above the
1MOhm threshold. The Maxim tcpc driver then signals TCPM_PORT_CLEAN
to restart toggling.
Renaming tcpci_maxim.c to tcpci_maxim_core.c and moving reg read/write
helper functions to the tcpci_maxim.h header file.
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230114093246.1933321-3-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/cdnsp-gadget.h')
0 files changed, 0 insertions, 0 deletions