diff options
| author | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2017-05-31 12:00:37 +0530 |
|---|---|---|
| committer | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2017-06-05 18:42:57 +0530 |
| commit | 77386df3568481e33e9ad572e7440096204f9a99 (patch) | |
| tree | 4ae1a004723cda9b9571d5ed899142a9fd956737 | |
| parent | ace73576d2eb567f552a699109b32d0917fccdbd (diff) | |
policy_engine: Add module parameter to start USB stack
USB 3.1 super speed compliance equipment may be detected as floating
charger by PMI as it may leave D+/D- lines floating (High speed data
lines). PD Policy engine does not start USB stack which results into
compliance failure as compliance expects USB stack to be started. Add
module parameter usb_compliance_mode to start USB stack on cable
connect (w/o depending on charger type).
Change-Id: Ieb33057a85b4bcff9c1e7c32c256663dd23f17ef
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
| -rw-r--r-- | drivers/usb/pd/policy_engine.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/pd/policy_engine.c b/drivers/usb/pd/policy_engine.c index 7d893c5815e2..e66ace914ce1 100644 --- a/drivers/usb/pd/policy_engine.c +++ b/drivers/usb/pd/policy_engine.c @@ -29,6 +29,11 @@ #include <linux/usb/usbpd.h> #include "usbpd.h" +/* To start USB stack for USB3.1 complaince testing */ +static bool usb_compliance_mode; +module_param(usb_compliance_mode, bool, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(usb_compliance_mode, "Start USB stack for USB3.1 compliance testing"); + enum usbpd_state { PE_UNKNOWN, PE_ERROR_RECOVERY, @@ -879,7 +884,8 @@ static void usbpd_set_state(struct usbpd *pd, enum usbpd_state next_state) pd->current_dr = DR_UFP; if (pd->psy_type == POWER_SUPPLY_TYPE_USB || - pd->psy_type == POWER_SUPPLY_TYPE_USB_CDP) + pd->psy_type == POWER_SUPPLY_TYPE_USB_CDP || + usb_compliance_mode) start_usb_peripheral(pd); } |
