genvif: PID_SOP
BRANCH=none
TEST=verify XML output
Tested-by: Denis Brockus
@@ -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
@@ -1811,6 +1810,25 @@ static int gen_vif(const char *name,
"FR_Swap_Supported_As_Initial_Sink",
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
*/
