summaryrefslogtreecommitdiff
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2016-11-16 11:30:30 -0800
committerJack Pham <jackp@codeaurora.org>2016-11-23 15:03:14 -0800
commit8f5b031e11be5bfc3bd58a79a27ac25c8988ddaf (patch)
tree0daad963ba42e05c596c8b701474e498ad3f984d /fs/jbd2/commit.c
parent9febdfdde008c8d7875b5186a4a37cb515cb924d (diff)
usb: pd: Fix sink hard reset timing
The current hard reset handling (most recently fixed with commit 172cec3a2c76 ("usb: pd: Improve sink hard reset handling")) is based on a maximum timeout for the longest possible (according to spec) duration that VBUS may turn off and back on again, just under 2s, before re-starting the sink and waiting for capabilities again. However, this method is prone to timing errors, particularly tTypeCSinkWaitCap, which should be based on when VBUS turns on. Fix this by making use of the VBUS presence notification from the charger (PROP_PRESENT). Keep track of this in the psy_changed() callback and use the falling notification to determine when to transition out of PE_SNK_TRANSITION_TO_DEFAULT into PE_SNK_STARTUP. Bring back PE_SNK_DISCOVERY which is now used as a waiting state until the VBUS rising notification comes and transition to PE_SNK_WAIT_FOR_CAPABILITIES. And move setting of PROP_VOLTAGE_MAX to PE_SNK_STARTUP after VBUS has turned off to avoid tripping the charger's overvoltage detection. Also since aforementioned commit, the CC HW is now able to handle VBUS going away and not treating it as a false disconnect, so we can remove the workaround as a disconnect can now be treated as a disconnect. Change-Id: I885f3f4c219e102758fd09c8aae9257d093ebb72 Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions