Currently power Delivery (PD) is enabled by default which sends
PD Hard reset in SINK mode to negogiate PD contract with host machine
after connect, if no capabilities message is received from other device.
This impacts with compliance for example: PMI ignores type-c disconnects
during PD Hard Reset. Add module parameter to disable PD so that it
doesn't enable PD communication during USB3.1 compliance testing.
Change-Id: Ia3e39cee1e65895402c18b380b650f0a34fb0cec
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
module_param(usb_compliance_mode, bool, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(usb_compliance_mode, "Start USB stack for USB3.1 compliance testing");
+static bool disable_usb_pd;
+module_param(disable_usb_pd, bool, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(disable_usb_pd, "Disable USB PD for USB3.1 compliance testing");
+
enum usbpd_state {
PE_UNKNOWN,
PE_ERROR_RECOVERY,
break;
}
- if (!val.intval)
+ if (!val.intval || disable_usb_pd)
break;
pd_reset_protocol(pd);