summaryrefslogtreecommitdiff
path: root/board/scarlet
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2018-02-28 17:13:18 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-02 15:47:00 -0800
commit6589e15e424f6a56f370a89e322240a1375839c7 (patch)
tree4be6e3e85941c9e53f8491575e85f294699e9c10 /board/scarlet
parent69c18ad6a6a77ea1c82465e6420280c8cf55b12f (diff)
downloadchrome-ec-6589e15e424f6a56f370a89e322240a1375839c7.tar.gz
scarlet: Turn off ADC after board version is read
We can turn off ADC after the first successful read for board version. A few milliwatts saved is important when Scarlet is in S3. BUG=b:72160379 BRANCH=scarlet TEST=Try 'version' command a few times on EC console and see correct board version. Change-Id: Id2bef415f161431ed895f49db30d50347479176d Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/942377 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Derek Basehore <dbasehore@chromium.org>
Diffstat (limited to 'board/scarlet')
-rw-r--r--board/scarlet/board.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/scarlet/board.c b/board/scarlet/board.c
index 4d55ebfee0..6734f92792 100644
--- a/board/scarlet/board.c
+++ b/board/scarlet/board.c
@@ -340,6 +340,14 @@ int board_get_version(void)
}
}
+ /*
+ * Disable ADC module after we detect the board version,
+ * since this is the only thing ADC module needs to do
+ * for this board.
+ */
+ if (version != BOARD_VERSION_UNKNOWN)
+ adc_disable();
+
return version;
}