diff options
author | Philip Chen <philipchen@google.com> | 2017-10-31 02:11:55 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-03 01:53:37 -0700 |
commit | 7d76175df7e00f9fa0a20fcea4c12b9033573042 (patch) | |
tree | 1fa41678e314f6dea71fa83c57ceb98c76afcb1a /board/nautilus/board.c | |
parent | 2f127f3081be00dc318b4e0b9a9947c68b24849d (diff) | |
download | chrome-ec-7d76175df7e00f9fa0a20fcea4c12b9033573042.tar.gz |
nautilus: Support keyboard matrix
Also fix the strapping pins for board id.
BUG=b:68684486
BRANCH=none
TEST=build Nautilus
Change-Id: I9e9b5fe73efc85456f87355524de3e7ff7a592fb
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/746562
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/nautilus/board.c')
-rw-r--r-- | board/nautilus/board.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/board/nautilus/board.c b/board/nautilus/board.c index 97ccb674e6..78f07ef354 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -807,36 +807,6 @@ void board_hibernate(void) ; } -int board_get_version(void) -{ - static int ver = -1; - uint8_t id4; - - if (ver != -1) - return ver; - - ver = 0; - - /* First 3 strappings are binary. */ - if (gpio_get_level(GPIO_BOARD_VERSION1)) - ver |= 0x01; - if (gpio_get_level(GPIO_BOARD_VERSION2)) - ver |= 0x02; - if (gpio_get_level(GPIO_BOARD_VERSION3)) - ver |= 0x04; - - /* - * 4th bit is using tristate strapping, ternary encoding: - * Hi-Z (id4=2) => 0, (id4=0) => 1, (id4=1) => 2 - */ - id4 = gpio_get_ternary(GPIO_BOARD_VERSION4); - ver |= ((id4 + 1) % 3) * 0x08; - - CPRINTS("Board ID = %d", ver); - - return ver; -} - /* Lid Sensor mutex */ static struct mutex g_lid_mutex; |