Skip to content

Commit 5051aeb

Browse files
Josh-TsaiJohnAZoidberg
authored andcommitted
fwk: modified the PD code to support one PD chip
Remove the hard code and use the for-loop to update the PD status. BRANCH=fwk-main BUG=None TEST=Marigold four type-c ports are workable TEST=Marigold right side type-c ports are workable if the PD chip is to 1 TEST=Either support 1 PD chip or 2 PD chips the error recovery feature is workable TEST=Either support 1 PD chip or 2 PD chips that can display the PD version in the setup menu Signed-off-by: Josh-Tsai <josh_tsai@compal.com> (cherry picked from commit bb8e00c)
1 parent a2c2bc5 commit 5051aeb

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

zephyr/program/framework/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ config PD_CCG8_CUSTOMIZE_BATT_MESSAGE
151151
Enable customize battery response for GRL test, EC will write specific
152152
register 0x4f to PD for GET_BATTERY_CAP and GET_BATTERY_STATUS.
153153

154+
config PLATFORM_EC_PD_CHIP_MAX_COUNT
155+
int "The maximum PD chips"
156+
default 2
157+
help
158+
We would like to design the PD function more flexible.
159+
Use this configuration to set the maximum PD chip with mainboard design.
160+
154161
config PD_COMMON_VBUS_CONTROL
155162
bool "Enable CCG common vbus control"
156163
help

zephyr/program/framework/src/board_host_command.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ static enum ec_status flash_notified(struct host_cmd_handler_args *args)
117117
/* TODO: should refactor this for each prjects */
118118
gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_lid_open));
119119
#endif
120-
121120
for (controller = 0; controller < PD_CHIP_COUNT; controller++)
122121
cypd_enable_interrupt(controller, true);
123122

0 commit comments

Comments
 (0)