mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 09:31:51 +00:00
pd: fix CC values in usb PD unittests
The if conditions to simulate the CC line levels had a couple of typos. Use a more realistic value for those corner cases. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=make run-usb_pd Change-Id: Ia924ee4cfe4512a7543cfcae4d532c9a250d9c8d Reviewed-on: https://chromium-review.googlesource.com/368720 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
2813413f35
commit
b23470dab7
@@ -36,13 +36,11 @@ int pd_adc_read(int port, int cc)
|
||||
pd_port[port].partner_role == PD_ROLE_SOURCE)
|
||||
/* we are sink connected to source, return Rp/Open */
|
||||
return (pd_port[port].partner_polarity == cc) ? 1700 : 0;
|
||||
else if (pd_port[port].host_mode &&
|
||||
pd_port[port].partner_role == PD_ROLE_SINK)
|
||||
/* both sources */
|
||||
else if (pd_port[port].host_mode)
|
||||
/* no sink on the other side, both CC are opened */
|
||||
return 3000;
|
||||
else if (!pd_port[port].host_mode &&
|
||||
pd_port[port].partner_role == PD_ROLE_SOURCE)
|
||||
/* both sinks */
|
||||
else if (!pd_port[port].host_mode)
|
||||
/* no source on the other side, both CC are opened */
|
||||
return 0;
|
||||
|
||||
/* should never get here */
|
||||
|
||||
Reference in New Issue
Block a user