MLK-18531 usb: typec: don't do vbus source disable for dead battery
authorLi Jun <jun.li@nxp.com>
Wed, 9 Jan 2019 10:01:47 +0000 (15:31 +0530)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit1e4ca473cb2a71eb95997248bbf469dd3c0070eb
tree3aea7f204a4a457ae51c89fdfdc83831b18a5431
parentd2eb7c0b47e6f8a7db1e4d3a5a231c768b2296f4
MLK-18531 usb: typec: don't do vbus source disable for dead battery

In PTN5110 design, DisableSourceVBUS command also disables the sink
enable signal because the EN_SNK can be used to source higher voltage,
and, there is only one TCPC command to disable sourcing voltage without
telling whether to disable 5V or the high voltage, and to keep the
design simple they designed the PTN5110 to disable both. with this
fact, we use the flag drive_vbus to check if the source vbus enable was
issued, if yes we then do vbus source disable, in dead battery case,
we never did vbus source enable, so will not issue vbus source disable
command.

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