mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 00:21:46 +00:00
pd: Fix unwanted resets on single-role power supplies
If we're still in DISCONNECTED or DISCONNECTED_DEBOUNCE state, don't check CC lines to detect a disconnect since CC polarity has not yet been established. BUG=chrome-os-partner:48220 BRANCH=None TEST=Verify PD contact can be negotiated on Snoball with either polarity. Change-Id: Iacde14446c0ff5d2170936b650f56668038f613e Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/315780 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
5de8d35d11
commit
d837c80ef2
@@ -2533,9 +2533,11 @@ void pd_task(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for disconnection */
|
||||
/* Check for disconnection if we're connected */
|
||||
if (!pd_is_connected(port))
|
||||
continue;
|
||||
#ifdef CONFIG_USB_PD_DUAL_ROLE
|
||||
if (!pd_is_connected(port) || pd_is_power_swapping(port))
|
||||
if (pd_is_power_swapping(port))
|
||||
continue;
|
||||
#endif
|
||||
if (pd[port].power_role == PD_ROLE_SOURCE) {
|
||||
|
||||
Reference in New Issue
Block a user