gru: Read the lid switch from the EC
authorSimon Glass <sjg@chromium.org>
Sun, 19 Jun 2016 22:53:39 +0000 (16:53 -0600)
committerchrome-bot <chrome-bot@chromium.org>
Fri, 24 Jun 2016 21:49:01 +0000 (14:49 -0700)
commit6f6fc88bd97effe72bcf0d09f3cf8d400151d2cb
treeb304f8b4a3492c0e4707125db17fd1bc3b27ca8d
parentf30c990ea51e85b5d4106c0e0d8ba653ceb6b081
gru: Read the lid switch from the EC

On gru and kevin the lid switch is only connected to the EC. To
support this, set up a GPIO to read from the EC.

BUG=chrome-os-partner:53208
BRANCH=none
TEST=with the rest of the patches applied, on a Gru device, while
     observing the AP console:

  - reboot the device into linux login prompt

  - reboot the device again, close the lid once the developer mode
    screen is displayed. Observe the device stop booting, printing on
    the console
VbAudioOpen() - note count 1
Lid is closed.
VbBootDeveloper() - shutdown requested!

Change-Id: I91c40eb521029933b84c12cc6749754531abe14e
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/353941
Reviewed-by: Shawn N <shawnn@chromium.org>
src/board/gru/board.c