diff options
author | Divya Jyothi <divya.jyothi@intel.com> | 2014-10-27 09:48:38 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-11-06 09:26:21 +0000 |
commit | 75ced738383d4b3bdf4e95b31c193cb0366e69cf (patch) | |
tree | 304e1fef1e803c3fb0af2241b9fd60c1c4815f5e /chip/mec1322/keyboard_raw.c | |
parent | 41cde665166da1aced2ece17f7b503c78cdb5c8f (diff) | |
download | chrome-ec-75ced738383d4b3bdf4e95b31c193cb0366e69cf.tar.gz |
Strago: Initial Version of Strago Board added.
Modules that are enabled are listed below:
- Power Sequencing
- Keyboard Scan and Protocol
- LPC to support Keyboard
- Power Button Task
ec.spi.bin has to be generated manualy using
pack_ec.py
BUG=None
BRANCH=None
TEST=Tested on Stargo-Proto board
Change-Id: Ic5d504c3d6e9c7c5f3482fb7e9e37800b6274824
Signed-off-by: Divya Jyothi <divya.jyothi@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/226303
Reviewed-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'chip/mec1322/keyboard_raw.c')
-rw-r--r-- | chip/mec1322/keyboard_raw.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/chip/mec1322/keyboard_raw.c b/chip/mec1322/keyboard_raw.c index 155ff839f2..da1b626db8 100644 --- a/chip/mec1322/keyboard_raw.c +++ b/chip/mec1322/keyboard_raw.c @@ -31,12 +31,29 @@ void keyboard_raw_task_start(void) test_mockable void keyboard_raw_drive_column(int out) { - if (out == KEYBOARD_COLUMN_ALL) + if (out == KEYBOARD_COLUMN_ALL) { MEC1322_KS_KSO_SEL = 1 << 5; /* KSEN=0, KSALL=1 */ - else if (out == KEYBOARD_COLUMN_NONE) +#ifdef CONFIG_KEYBOARD_COL2_INVERTED + gpio_set_level(GPIO_KBD_KSO2, 1); +#endif + } else if (out == KEYBOARD_COLUMN_NONE) { MEC1322_KS_KSO_SEL = 1 << 6; /* KSEN=1 */ - else - MEC1322_KS_KSO_SEL = out + 4; /* KSO starts from KSO04 */ +#ifdef CONFIG_KEYBOARD_COL2_INVERTED + gpio_set_level(GPIO_KBD_KSO2, 0); +#endif + } else { +#ifdef CONFIG_KEYBOARD_COL2_INVERTED + if (out == 2) { + MEC1322_KS_KSO_SEL = 1 << 6; /* KSEN=1 */ + gpio_set_level(GPIO_KBD_KSO2, 1); + } else { + MEC1322_KS_KSO_SEL = out; + gpio_set_level(GPIO_KBD_KSO2, 0); + } +#else + MEC1322_KS_KSO_SEL = out; +#endif + } } test_mockable int keyboard_raw_read_rows(void) @@ -55,7 +72,7 @@ void keyboard_raw_enable_interrupt(int enable) } } -static void keyboard_raw_interrupt(void) +void keyboard_raw_interrupt(void) { /* Clear interrupt status bits */ MEC1322_KS_KSI_STATUS = 0xff; |