servo: ec: Fix lid_open get function

lid_open previously relied upon a variable in EC memory at a fixed
address, which is not portable and fails on most platforms. Instead, use
the new 'lidstate' command to determine lid state.

BUG=chrome-os-partner:55975
BRANCH=None
TEST=Manual on kevin, verify after 'lid_open:yes', lid state shows as
'yes', and same for 'no' state. Also, verify "rw 0x40080730" is echo'd
to EC console when servod is run with board parameter 'link'.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I57e04772a26b8e36c965ab725126bdafb1644e48
Reviewed-on: https://chromium-review.googlesource.com/366701
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
5 files changed