Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37867 )
Change subject: src/ec/google/chromeec: Get Type-C Mux info from EC (TCPM) ......................................................................
Patch Set 14:
(5 comments)
https://review.coreboot.org/c/coreboot/+/37867/14/src/ec/google/chromeec/ec.... File src/ec/google/chromeec/ec.h:
https://review.coreboot.org/c/coreboot/+/37867/14/src/ec/google/chromeec/ec.... PS14, Line 43: google_chromeec_usb_get_pd_ports What about google_chromeec_get_num_pd_ports(int *num_ports) on line 321?
https://review.coreboot.org/c/coreboot/+/37867/14/src/ec/google/chromeec/ec.... File src/ec/google/chromeec/ec.c:
https://review.coreboot.org/c/coreboot/+/37867/14/src/ec/google/chromeec/ec.... PS14, Line 1487: struct ec_params_usb_pd_control pd_control; : struct ec_response_usb_pd_control_v2 resp; : struct chromeec_command cmd; : : pd_control.port = port; : pd_control.role = USB_PD_CTRL_ROLE_NO_CHANGE; : pd_control.mux = USB_PD_CTRL_ROLE_NO_CHANGE; : pd_control.swap = USB_PD_CTRL_SWAP_NONE; : : cmd.cmd_code = EC_CMD_USB_PD_CONTROL; : cmd.cmd_version = 2; : cmd.cmd_data_in = &pd_control; : cmd.cmd_size_in = sizeof(pd_control); : cmd.cmd_data_out = &resp; : cmd.cmd_size_out = sizeof(resp); : cmd.cmd_dev_index = 0; Please follow the style of struct initialization in this file.
https://review.coreboot.org/c/coreboot/+/37867/14/src/ec/google/chromeec/ec.... PS14, Line 1520: struct ec_params_locate_chip req; : struct ec_response_locate_chip resp; : struct chromeec_command cmd; : : req.type = EC_CHIP_TYPE_TCPC; : req.index = port; : : cmd.cmd_code = EC_CMD_LOCATE_CHIP; : cmd.cmd_version = 0; : cmd.cmd_data_in = &req; : cmd.cmd_size_in = sizeof(req); : cmd.cmd_data_out = &resp; : cmd.cmd_size_out = sizeof(resp); : cmd.cmd_dev_index = 0; : Same here.
https://review.coreboot.org/c/coreboot/+/37867/14/src/ec/google/chromeec/ec.... PS14, Line 1549: struct chromeec_command cmd; : struct ec_response_usb_pd_mux_info resp_mux; : struct ec_params_usb_pd_mux_info req_mux; : : if (port < 0) : return -1; : : cmd.cmd_code = EC_CMD_USB_PD_MUX_INFO; : cmd.cmd_version = 0; : req_mux.port = port; : cmd.cmd_data_in = &req_mux; : cmd.cmd_size_in = sizeof(req_mux); : cmd.cmd_data_out = &resp_mux; : cmd.cmd_size_out = sizeof(resp_mux); : cmd.cmd_dev_index = 0; Same here.
https://review.coreboot.org/c/coreboot/+/37867/14/src/ec/google/chromeec/ec.... PS14, Line 1583: ret = google_chromeec_get_num_pd_ports(&num_ports) :)