diff options
author | Denis Brockus <dbrockus@google.com> | 2021-03-02 12:04:03 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-02 23:44:21 +0000 |
commit | 37ba1a68353bcc32520f82286c30647188558350 (patch) | |
tree | 7ec54497310c9708af434f4c3fe7bc0ce4fd0917 /include | |
parent | b5ea1e1f5d38eff3eae49ebf233324a546870a65 (diff) | |
download | chrome-ec-37ba1a68353bcc32520f82286c30647188558350.tar.gz |
TCPMv2: PD Timers - Allow StateMachine timer group range disables
BUG=none
BRANCH=none
TEST=normal USB-C operation
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I9c5bc90cc68ba424ad7632c10ba513103288b414
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2729620
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd_timer.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/usb_pd_timer.h b/include/usb_pd_timer.h index ea0b302e17..5757bd7ada 100644 --- a/include/usb_pd_timer.h +++ b/include/usb_pd_timer.h @@ -196,6 +196,20 @@ enum pd_task_timer { }; BUILD_ASSERT(PD_TIMER_COUNT <= 32); +enum pd_timer_range { + PE_TIMER_RANGE, + PR_TIMER_RANGE, + TC_TIMER_RANGE, +}; +#define PE_TIMER_START PE_TIMER_BIST_CONT_MODE +#define PE_TIMER_END PE_TIMER_WAIT_AND_ADD_JITTER + +#define PR_TIMER_START PR_TIMER_CHUNK_SENDER_RESPONSE +#define PR_TIMER_END PR_TIMER_TCPC_TX_TIMEOUT + +#define TC_TIMER_START TC_TIMER_CC_DEBOUNCE +#define TC_TIMER_END TC_TIMER_VBUS_DEBOUNCE + /* * pd_timer_init * Initialize Power Delivery Timer module @@ -223,6 +237,14 @@ void pd_timer_enable(int port, enum pd_task_timer timer, uint32_t expires_us); */ void pd_timer_disable(int port, enum pd_task_timer timer); +/* + * pd_timer_disable_range + * Disable all of the timers in a group range + * + * @param port USB-C port number + * @param range Group range to disable + */ +void pd_timer_disable_range(int port, enum pd_timer_range range); /* * pd_timer_is_disabled |