OSDN Git Service

usb: pd: Re-enable SuperSpeed host by default
authorJack Pham <jackp@codeaurora.org>
Wed, 14 Dec 2016 02:25:37 +0000 (18:25 -0800)
committerJack Pham <jackp@codeaurora.org>
Wed, 18 Jan 2017 07:08:20 +0000 (23:08 -0800)
commitd1a0cb9fa585fb4f4a6b49615f9239a570538243
tree93421dbc15da69ce0e34e23e9f3649554fe6fa23
parenta51b7f60003e6071703d5e4489dae0f3ab7ae264
usb: pd: Re-enable SuperSpeed host by default

This reverts commit 85cc38fca20f ("usb: pd: Add support to set the
maximum speed via extcon") which unnecessarily restricted starting
USB host mode to high-speed only. Relax this so that USB host can
start in SuperSpeed when DFP mode is entered.

However, the only exception is if DisplayPort mode is discovered,
we need to drop down to high-speed only due to current hardware
limitations. This is handled during the VDM discovery stage.

Also use this opportunity to refactor all extcon_set_state_() calls
to helper functions that start/stop USB host/peripheral modes.

Change-Id: I2f32f70c57a8a6e2c34c8daf59dea931b445422f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
drivers/usb/pd/policy_engine.c