diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-11 17:09:07 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-14 23:27:28 +0000 |
commit | 1049bbbad81ab404c48cbc757c015cc8a373049b (patch) | |
tree | 6b4659b9c82c08dd840bb3f57fd7ac0b9201a7fd | |
parent | 027be6fdbbf90ac670dfcbe62c73b852db419015 (diff) | |
download | chrome-ec-1049bbbad81ab404c48cbc757c015cc8a373049b.tar.gz |
rambi: Fix driving keyboard column 2
Rambi's Silego chip inverts the pull as well as the signal. So it has
a pulldown for the signal instead of a pullup. The EC must drive the
signal push-pull, since open-drain only works for signals with pullups.
BUG=chrome-os-partner:23198
BRANCH=none
TEST=type on keyboard; C/D/E/3/F1-F4 should all work
Change-Id: Iaea4f540c523824571a568b70cca3e0fb467f79c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/172915
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | chip/lm4/keyboard_raw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/lm4/keyboard_raw.c b/chip/lm4/keyboard_raw.c index 2a158769a4..06f592b64c 100644 --- a/chip/lm4/keyboard_raw.c +++ b/chip/lm4/keyboard_raw.c @@ -29,6 +29,14 @@ void keyboard_raw_init(void) LM4_GPIO_ODR(LM4_GPIO_P) = 0xff; LM4_GPIO_ODR(LM4_GPIO_Q) |= 0x1f; +#ifdef CONFIG_KEYBOARD_COL2_INVERTED + /* + * When column 2 is inverted, the Silego has a pulldown instead of a + * pullup. So drive it push-pull instead of open-drain. + */ + LM4_GPIO_ODR(LM4_GPIO_P) &= ~(1 << 2); +#endif + /* Set row inputs with pull-up */ LM4_GPIO_AFSEL(KB_SCAN_ROW_GPIO) &= 0xff; LM4_GPIO_DEN(KB_SCAN_ROW_GPIO) |= 0xff; |