mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-01 04:43:50 +00:00
pd: Fix false USB-C DTS detection
tcpm_get_cc() returns TYPEC_CC_VOLT_*, not TYPEC_CC_*. Check for RP rather than non-open to match USB-C spec (Table B-2 Rp/Rp Charging Current Values for a DTS Source). BUG=chromium:775542 BRANCH=servo TEST=Verify donette and guppy are not detected as DTS, verify suzy-qable is detected as DTS, on kevin DUT. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I0ff5550e9171ff86b42b489525044bf63827240c Reviewed-on: https://chromium-review.googlesource.com/733220 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
ca013a9780
commit
8a909ba35d
@@ -1531,7 +1531,7 @@ static typec_current_t get_typec_current_limit(int polarity, int cc1, int cc2)
|
||||
else
|
||||
charge = 0;
|
||||
|
||||
if (cc_alt != TYPEC_CC_OPEN)
|
||||
if (cc_is_rp(cc_alt))
|
||||
charge |= TYPEC_CURRENT_DTS_MASK;
|
||||
|
||||
return charge;
|
||||
|
||||
Reference in New Issue
Block a user