Skip to content

Commit e63966e

Browse files
LeoCX-TsaiJohnAZoidberg
authored andcommitted
fwk: main: Fix GRL TEST Item PD.PS.SRC.3#18
for this test item device will provide the 5V0A PDO, and DUT accepts it, but we didn't limit the charger, so DUT will be drawn the current from the device. BRANCH=fwk-main BUG=TEST.PD.PS.SRC.3#18 TEST=verify on the lilac, can pass through test item Signed-off-by: LeoCX_Tsai <LeoCX_Tsai@compal.com> (cherry picked from commit 30fc006)
1 parent 9ddb58b commit e63966e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

zephyr/program/framework/src/cypress_pd_common.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,14 @@ void cypd_update_port_state(int controller, int port)
10591059
*/
10601060

10611061
if (pd_port_states[port_idx].c_state == CCG_STATUS_SOURCE) {
1062+
/*
1063+
* at GRL TEST.PD.PS.SRC.3#18 if device didn't provide current(5V0A)
1064+
* DUT should not get power from device, so limit the charger
1065+
* to avoid drawn the current from device
1066+
*/
1067+
if (pd_current == 0)
1068+
type_c_current = pd_current;
1069+
10621070
typec_set_input_current_limit(port_idx, type_c_current, TYPE_C_VOLTAGE);
10631071
charge_manager_set_ceil(port_idx, CEIL_REQUESTOR_PD,
10641072
type_c_current);

0 commit comments

Comments
 (0)