diff options
author | Denis Brockus <dbrockus@google.com> | 2021-02-17 12:27:33 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-01 22:49:57 +0000 |
commit | 3f9cf0b2a131ecd6b83f031332fd6ea7e81b203b (patch) | |
tree | 96f25b27d280f2aaeb311bbbc4d91f4791660c24 /common/usbc/usb_pd_timer.c | |
parent | 6cb085f37d5a8f53c6d004214fdd6a8e7b9acf1a (diff) | |
download | chrome-ec-3f9cf0b2a131ecd6b83f031332fd6ea7e81b203b.tar.gz |
TCPMv2: PD Timers - Add pd_timer_dump debug
Add "pd X timer" command to pd_console
BUG=b:178029034
BRANCH=none
TEST=ec console: pd timer
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I108108adf4cbbdec0c233831830182b8835a7ba3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707806
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'common/usbc/usb_pd_timer.c')
-rw-r--r-- | common/usbc/usb_pd_timer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/common/usbc/usb_pd_timer.c b/common/usbc/usb_pd_timer.c index 0bbf06f0e4..e06de20389 100644 --- a/common/usbc/usb_pd_timer.c +++ b/common/usbc/usb_pd_timer.c @@ -9,6 +9,7 @@ #include "limits.h" #include "system.h" #include "usb_pd_timer.h" +#include "usb_tc_sm.h" #define MAX_PD_PORTS CONFIG_USB_PD_PORT_MAX_COUNT #define MAX_PD_TIMERS PD_TIMER_COUNT @@ -227,8 +228,11 @@ void pd_timer_dump(int port) if (now < timer_expires[port][timer]) delta = timer_expires[port][timer] - now; - ccprints("[%2d] Active: %s (%d)", - timer, pd_timer_names[timer], (uint32_t)delta); + ccprints("[%2d] Active: %s (%d%s)", + timer, pd_timer_names[timer], (uint32_t)delta, + tc_event_loop_is_paused(port) + ? "-PAUSED" + : ""); } else { ccprints("[%2d] Inactive: %s", timer, pd_timer_names[timer]); |