summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2018-10-22 18:35:06 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-05 12:09:57 +0000
commit06922f11767086a5aeb68768d032685749388333 (patch)
treeed8e8e70d520c59e0f17fa8ec37ca9fa60878aaf
parentb41fc513222af3574b89c72a1fccaf8284d09890 (diff)
downloadchrome-ec-06922f11767086a5aeb68768d032685749388333.tar.gz
CHERRY-PICK: nocturne : Add logging for base detect voltages.
It's kind of handy to know what the voltage was when we decided to change major states. BUG=None BRANCH=firmware-nocturne-10984.B TEST=Flash nocturne; attach and detach base and verify voltages are printed when the state changes. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/1295297 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Change-Id: I27ed42f46344c712171d05c11f36ae2f949040f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2160868 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Patryk Duda <pdk@semihalf.com> Commit-Queue: Patryk Duda <pdk@semihalf.com>
-rw-r--r--board/nocturne/base_detect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/nocturne/base_detect.c b/board/nocturne/base_detect.c
index 70600388f9..07916674bf 100644
--- a/board/nocturne/base_detect.c
+++ b/board/nocturne/base_detect.c
@@ -195,6 +195,8 @@ static void base_detect_deferred(void)
case BASE_ATTACHED_DEBOUNCE:
/* Check to see if it's still attached. */
if (base_seems_attached(attach_reading, detach_reading)) {
+ CPRINTS("BD: att: %dmV det: %dmV", attach_reading,
+ detach_reading);
set_state(BASE_ATTACHED);
base_detect_changed();
} else if (base_seems_detached(attach_reading,
@@ -214,6 +216,8 @@ static void base_detect_deferred(void)
case BASE_DETACHED_DEBOUNCE:
/* Check to see if a base is still detached. */
if (base_seems_detached(attach_reading, detach_reading)) {
+ CPRINTS("BD: att: %dmV det: %dmV", attach_reading,
+ detach_reading);
set_state(BASE_DETACHED);
base_detect_changed();
} else if (base_seems_attached(attach_reading,