MLK-17108-3 usb: typec: tcpci: don't do force discharge if enable vbus sink
authorLi Jun <jun.li@nxp.com>
Wed, 9 Jan 2019 09:56:13 +0000 (15:26 +0530)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commitb1e912585c275247bf4f2ad89249c5d1736cc8f2
tree8fd5ad5be9030034743ac3c293e1aad640806398
parent84de39ffad3cebd9b3569c941ebf64a8a9bba1d8
MLK-17108-3 usb: typec: tcpci: don't do force discharge if enable vbus sink

We use vbus force discharge to have a quick vbus off for power role swap,
which works like this: enable vbus force discharge and wait the vbus fall
below vbus low threshold, when reaches, an alarm generated and tcpm can go
forward. but current code do vbus force discharge in any disable source
vbus case, in enable vbus charge case, we firstly disable source vbus and
then turn on vbus sink, in between, vbus force discharge should not be
enabled.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
drivers/usb/typec/tcpci.c