OSDN Git Service

usb: dwc3: dwc3-msm: Handle floating charger PMI notification properly
authorHemant Kumar <hemantk@codeaurora.org>
Thu, 27 Jul 2017 22:11:25 +0000 (15:11 -0700)
committerHemant Kumar <hemantk@codeaurora.org>
Fri, 28 Jul 2017 23:36:54 +0000 (16:36 -0700)
commitc5c2ca0587c70176def2cf049d20c55d3656444b
tree29d418ea212c2883c8dde865716df4928286cad0
parent0a57938d144e24ea7ef6b56ae6b2d4d732060f00
usb: dwc3: dwc3-msm: Handle floating charger PMI notification properly

When floating charger is detected, driver first notifies -ETIMEDOUT to
PMI after 10 sec and then stops peripheral by simulating cable disconnect.
As part of disconnect it notifies PMI to draw 0ma which PMI re-interprets
as a SDP in bus suspend state and reconfigures PMI for SDP. Hence send
charger current notification only as part of cable disconnect simulation
by checking charger type.

Change-Id: Ibafe8d52fa14ff32b6cb11e9f6e15a4f3f147d7a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
drivers/usb/dwc3/dwc3-msm.c