diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2017-12-11 15:04:04 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-12-12 03:57:19 -0800 |
commit | 2f4fd74df5af5885a24d2c1ddc9deb71dd874315 (patch) | |
tree | 16ac6f9a219d2f3c15a2aaf776564dcef59c1aaf /include/keyboard_protocol.h | |
parent | a7c08b257fff5420a584d0d8ac5529efcc111403 (diff) | |
download | chrome-ec-2f4fd74df5af5885a24d2c1ddc9deb71dd874315.tar.gz |
hammer: Detect backlight circuitry
Pull-down means backlight is present, pull-up means backlight
is absent.
After detection, we still apply internal pull-down on the GPIO,
to make sure old boards with both pull-up and pull-down stuffed
do not always keep backlight on.
BRANCH=none
BUG=b:67722756
TEST=On reworked board with pull-down on backlight pin,
backlight works, and "Backlight present" shown in console.
TEST=On old board with both pull-up and pull-down, backlight is
off by default, and "Backlight not present" shown in console.
Change-Id: I6988c6ef8f4d155a08967db34f72d7ea4c835306
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/538458
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/keyboard_protocol.h')
-rw-r--r-- | include/keyboard_protocol.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/keyboard_protocol.h b/include/keyboard_protocol.h index a8eafe308d..2b47ef7e32 100644 --- a/include/keyboard_protocol.h +++ b/include/keyboard_protocol.h @@ -49,4 +49,9 @@ static inline void keyboard_state_changed(int row, int col, int is_pressed) {} void keyboard_state_changed(int row, int col, int is_pressed); #endif +/** + * Returns true if keyboard backlight is present/detected. + */ +int board_has_keyboard_backlight(void); + #endif /* __CROS_EC_KEYBOARD_PROTOCOL_H */ |