FROMGIT: usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled
Auto discharge circuits kick in only when vbus decays and reaches
VBUS_SINK_DISCONNECT_THRESHOLD threshold. Enable bleed discharge to
discharge vbus to VBUS_SINK_DISCONNECT_THRESHOLD upon disconnect.
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20201211071145.2199997-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3b6c3d0480 usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I816aecdc1191531c8d6f7e8a035cc66d40faf16b
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8d085cacdc
commit
c3c90101e2
@@ -725,6 +725,8 @@ struct tcpci *tcpci_register_port(struct device *dev, struct tcpci_data *data)
|
||||
tcpci->tcpc.enable_auto_vbus_discharge = tcpci_enable_auto_vbus_discharge;
|
||||
tcpci->tcpc.set_auto_vbus_discharge_threshold =
|
||||
tcpci_set_auto_vbus_discharge_threshold;
|
||||
regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_BLEED_DISCHARGE,
|
||||
TCPC_POWER_CTRL_BLEED_DISCHARGE);
|
||||
}
|
||||
|
||||
if (tcpci->data->vbus_vsafe0v)
|
||||
|
||||
Reference in New Issue
Block a user