diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-09-15 05:56:09 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-15 12:21:35 -0700 |
commit | 552e3ceaee84c8745ada3284fe940fb6e9a4b6a8 (patch) | |
tree | d6c20cef3ad24fded48b6f6f5d5e25b54204dbfa /common | |
parent | 16a18a5e0eeaeebff5f4ab5c9363481f8d1426aa (diff) | |
download | chrome-ec-552e3ceaee84c8745ada3284fe940fb6e9a4b6a8.tar.gz |
pd: restart toggling immediatly when dual role mode is re-enabled
Kick the PD task when the dual role toggling is enabled to ensure we
start toggling immediatly and detect a UFP (USB device).
The issue was visible with the CONFIG_USB_PD_LOW_POWER change where the
task was waking up only every minute when the toggling was disabled,
the whole system would take up to a minute after resume to detect a peripheral
connected while in S3.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=smaug
BUG=chrome-os-partner:45347
TEST=On Smaug, put the system into S3, plug a USB device (e.g. a USB
key), transition to S0 and verify that the kernel is receiving
immediatly the "host mode" notification.
Change-Id: I12d10941f9d2cefdfe711847ba0aec9f269e9bcd
Reviewed-on: https://chromium-review.googlesource.com/299796
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit 6a0e8ec3b9b1a7a0eb222a9e6c132d88d33f60e2)
Reviewed-on: https://chromium-review.googlesource.com/299807
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/usb_pd_protocol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 70aff84204..c058a59468 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -2560,6 +2560,8 @@ static void dual_role_on(void) #endif pd[i].flags |= PD_FLAGS_CHECK_PR_ROLE | PD_FLAGS_CHECK_DR_ROLE; + /* kick the task to ensure we start toggling immediatly */ + task_wake(PD_PORT_TO_TASK_ID(i)); } } DECLARE_HOOK(HOOK_CHIPSET_RESUME, dual_role_on, HOOK_PRIO_DEFAULT); |