Commit 8285bc18 authored by Badhri Jagan Sridharan's avatar Badhri Jagan Sridharan Committed by Xin Li
Browse files

FROMLIST: usb: typec: tcpci: Implement Auto discharge disconnect callbacks

Implement callbacks for enabling/disabling
POWER_CONTROL.AutoDischargeDisconnect.

TCPCI spec allows TCPC hardware to autonomously discharge the vbus
capacitance upon disconnect. The expectation is that the TCPM enables
AutoDischargeDisconnect while entering SNK/SRC_ATTACHED states. Hardware
then automously discharges vbus when the vbus falls below a certain
threshold i.e. VBUS_SINK_DISCONNECT_THRESHOLD.

Apart from enabling the vbus discharge circuit, AutoDischargeDisconnect
is also used a flag to move TCPCI based TCPC implementations into
Attached.Snk/Attached.Src state as mentioned in
Figure 4-15. TCPC State Diagram before a Connection of the
USB Type-C Port Controller Interface Specification.
In such TCPC implementations, setting AutoDischargeDisconnect would
prevent TCPC into entering "Connection_Invalid" state as well.

Bug: 168555244
Link: https://lore.kernel.org/patchwork/patch/1309798/


Signed-off-by: default avatarBadhri Jagan Sridharan <badhri@google.com>
Change-Id: Idbb8d5855850eee8e876811e29b7e60baf854ff1
(cherry picked from commit 33936ca3f6348db3e2e79776b01bc8339c446c80)
(cherry picked from commit 3622a289e91fe57a4a6b8ca210119c1b645444ea)
Signed-off-by: default avatarWill McVicker <willmcvicker@google.com>
parent 303a3291
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment