Files
OpenCellular/common
Aseda Aboagye 36980ec169 pd: Properly assign data role on reset
According to PD spec:
- Data role shall not be reset on soft reset.
- Data role shall be reset to power-role default on hard reset.

Implement the above. Even if both ports follow spec, it's still possible
for a data role conflict to occur if, for example, data role swap occurs
(data role mismatches power role default) followed by a hardware reset
of one port (such that data role gets reset to power role default).
Handle such cases by taking error recovery actions.

BUG=b:71333840,chromium:805040

TEST=Connect scarlet to powered Apple accessory, verify scarlet comes up
in SNK-DFP after soft reset and issuing "reboot" on EC console.  After
issuing a hard reset, the port comes up in SNK-UFP (which is the
power-role default).

BRANCH=None

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: I65139f277d59a0612f8323d711080f52425ff5e7
Reviewed-on: https://chromium-review.googlesource.com/885462
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2018-04-25 23:00:01 -07:00
..
2018-04-04 18:52:13 -07:00
2017-12-28 14:50:29 -08:00
2018-04-10 19:13:11 -07:00
2018-04-03 18:47:12 -07:00
2015-05-19 02:46:27 +00:00
2018-04-04 18:52:15 -07:00
2018-01-10 12:58:55 -08:00
2016-11-15 17:41:53 -08:00
2017-12-28 12:35:08 -08:00
2017-09-11 11:14:24 -07:00
2016-03-02 13:39:47 -08:00
2017-06-02 10:38:57 -07:00
2017-10-31 13:04:59 -07:00
2018-03-20 19:30:06 -07:00
2014-05-17 20:14:17 +00:00
2018-03-01 12:39:05 -08:00
2016-03-21 16:35:33 -07:00
2017-05-09 23:20:07 -07:00
2017-11-06 13:48:38 -08:00
2017-08-10 22:47:24 -07:00
2018-04-11 04:39:07 -07:00
2017-12-18 20:32:58 -08:00
2017-12-18 20:32:58 -08:00
2018-03-20 19:30:17 -07:00
2017-09-22 10:18:50 -07:00