diff options
Diffstat (limited to 'board/servo_v4')
-rw-r--r-- | board/servo_v4/usb_pd_policy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/board/servo_v4/usb_pd_policy.c b/board/servo_v4/usb_pd_policy.c index 1f42b1829a..bb171053bd 100644 --- a/board/servo_v4/usb_pd_policy.c +++ b/board/servo_v4/usb_pd_policy.c @@ -385,7 +385,8 @@ int pd_tcpc_cc_nc(int port, int cc_volt, int cc_sel) if (cc_config & CC_DISABLE_DTS) nc = cc_volt >= pd_src_vnc[rp_index]; else - nc = cc_volt >= pd_src_vnc_dts[rp_index][cc_sel]; + nc = cc_volt >= pd_src_vnc_dts[rp_index][ + cc_config & CC_POLARITY ? !cc_sel : cc_sel]; return nc; } @@ -411,7 +412,8 @@ int pd_tcpc_cc_ra(int port, int cc_volt, int cc_sel) if (cc_config & CC_DISABLE_DTS) ra = cc_volt < pd_src_rd_threshold[rp_index]; else - ra = cc_volt < pd_src_rd_threshold_dts[rp_index][cc_sel]; + ra = cc_volt < pd_src_rd_threshold_dts[rp_index][ + cc_config & CC_POLARITY ? !cc_sel : cc_sel]; return ra; } |