Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49f21ce1 authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa Committed by Jack Pham
Browse files

Policy_engine: Add module parameter to disable PD



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: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent 34a1f1d4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -34,6 +34,10 @@ static bool usb_compliance_mode;
module_param(usb_compliance_mode, bool, 0644);
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, 0644);
MODULE_PARM_DESC(disable_usb_pd, "Disable USB PD for USB3.1 compliance testing");

enum usbpd_state {
	PE_UNKNOWN,
	PE_ERROR_RECOVERY,
@@ -910,7 +914,7 @@ static void usbpd_set_state(struct usbpd *pd, enum usbpd_state next_state)
			break;
		}

		if (!val.intval)
		if (!val.intval || disable_usb_pd)
			break;

		pd_reset_protocol(pd);