summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJameson Thies <jthies@google.com>2022-07-29 19:56:20 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-16 15:50:08 +0000
commite273823c19f2f902a67ccbdee51489119bb28669 (patch)
tree51ad7d2f81af29187996073b9cb0885492181688 /test
parent2e68f3ee03f51fb0a3f8c0cad6868b2f1fb34a5a (diff)
downloadchrome-ec-e273823c19f2f902a67ccbdee51489119bb28669.tar.gz
TCMPV2: Add USB PD power button support in S0/S0ix/S3 states
Currently a USB PD power button can only be used wake a device which is shutdown. To account for devices which use a USB PD power button and cannot enable a HID interface, this CL adds USB PD power button support to Suspend and On power states. When a device is either suspended or on, a short USB PD power button press will simulate a 500ms power button press and a long USB PD power button press will shutdown the device. BUG=b:236022894 TEST=make try_build_boards, make runhosttests and zmake test test-drivers. Also working interactively with a dock that supports sending alerts on button presses. BRANCH=None Signed-off-by: Jameson Thies <jthies@google.com> Change-Id: I3a8adaa01dbf07a03b0e1451d3a5af5d5f39c442 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3794615 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'test')
-rw-r--r--test/usb_pd_timer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/usb_pd_timer.c b/test/usb_pd_timer.c
index 85044fc987..91e1360fb1 100644
--- a/test/usb_pd_timer.c
+++ b/test/usb_pd_timer.c
@@ -195,9 +195,10 @@ int test_pd_timers(void)
TEST_ASSERT(pd_timer_is_disabled(port, bit));
/*
- * Disable the PE timer range, which contains the previously enabled
- * timers 1-5.
+ * Disable the PE and DPM timer ranges, which contain the previously
+ * enabled timers 1-5.
*/
+ pd_timer_disable_range(port, DPM_TIMER_RANGE);
pd_timer_disable_range(port, PE_TIMER_RANGE);
/* Verify all timers are disabled. */
for (bit = 0; bit < PD_TIMER_COUNT; ++bit)