ec/lenovo/h8: Add function to query sense state
commit2dc00fab7c46369bffdedf3afea2af720e4add80
authorPatrick Rudolph <siro@das-labor.org>
Sat, 20 Oct 2018 15:10:04 +0000 (20 17:10 +0200)
committerPatrick Georgi <pgeorgi@google.com>
Wed, 8 May 2019 10:26:35 +0000 (8 10:26 +0000)
tree1a45c0849578404e4a9d9e8665e2ca62f5163b38
parent1d3b3c3c0955a652a1b602c5fd86dc6c5890e967
ec/lenovo/h8: Add function to query sense state

* Add function to wait for sense registers to become valid.
* Add function to retrieve Fn-Key state.

Tested on Lenovo T500:
* It takes about 700msec for the registers to become valid.

Tested on Lenovo T520:
* It takes less than 150msec for the registers to become valid.

Change-Id: Ie27e2881a256c4efb3def11f05070c446db6e5fc
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/29204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
src/ec/lenovo/h8/Makefile.inc
src/ec/lenovo/h8/h8.h
src/ec/lenovo/h8/sense.c [new file with mode: 0644]