diff options
-rw-r--r-- | util/genvif.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/util/genvif.c b/util/genvif.c index b4afc9b0af..00a5e13b9b 100644 --- a/util/genvif.c +++ b/util/genvif.c @@ -639,7 +639,6 @@ __maybe_unused static void set_vif_field_itis(struct vif_field_t *vif_field, * DFP_VDO_Port_Number numericFieldType * Modal_Operation_Supported_SOP booleanFieldType * USB_VID_SOP numericFieldType - * PID_SOP numericFieldType * bcdDevice_SOP numericFieldType * SVID_Fixed_SOP booleanFieldType * Num_SVIDs_Min_SOP numericFieldType @@ -1812,6 +1811,25 @@ static int gen_vif(const char *name, IS_ENABLED(CONFIG_USB_PD_FRS)); /********************************************************************* + * SOP Discovery Fields + */ + if (IS_ENABLED(CONFIG_USB_PD_TCPMV2)) { + char hex_str[10]; + + #if defined(CONFIG_USB_PID) + sprintf(hex_str, "%04X", CONFIG_USB_PID); + set_vif_field_itss(&vif_fields[PID_SOP], + "PID_SOP", + CONFIG_USB_PID, hex_str); + #else + sprintf(hex_str, "%04X", DEFAULT_MISSING_PID); + set_vif_field_itss(&vif_fields[PID_SOP], + "PID_SOP", + DEFAULT_MISSING_PID, hex_str); + #endif + } + + /********************************************************************* * Battery Charging 1.2 Fields */ if (bc_support == BC_1_2_SUPPORT_CHARGING_PORT || |