diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2020-09-30 13:49:45 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-13 02:32:42 +0000 |
commit | 1f16d1cb6d2bf1d815ac77e8d628040a3a67f0c6 (patch) | |
tree | ebd6d9e0775bc12a57e42c6dc4fdd942dffbd95c | |
parent | d5362a9d06c4a580d98823b2deeb2534ac0e967a (diff) | |
download | chrome-ec-1f16d1cb6d2bf1d815ac77e8d628040a3a67f0c6.tar.gz |
it83xx/keyboard: enable push-pull for KSO2
This change enables push-pull for EC's KSO2 if
CONFIG_KEYBOARD_COL2_INVERTED is enabled (H1 inverts signal
of column 2 to keyboard).
BUG=b:169715234
BRANCH=octopus
TEST= EC is able to drive KSO2 which connected to H1 to 3.3V.
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Change-Id: I61e07a15be2c5275363f358bf539c3311305d845
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2437722
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Tested-by: James Chao <james_chao@asus.corp-partner.google.com>
(cherry picked from commit 2f16162c2bc80c94c8dd2a652cbd682c3a499746)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2449513
Reviewed-by: James Chao <james_chao@asus.corp-partner.google.com>
Reviewed-by: Henry Sun <henrysun@google.com>
Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r-- | chip/it83xx/keyboard_raw.c | 5 | ||||
-rw-r--r-- | chip/it83xx/registers.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/chip/it83xx/keyboard_raw.c b/chip/it83xx/keyboard_raw.c index 9c5d1028ae..139cb08eb2 100644 --- a/chip/it83xx/keyboard_raw.c +++ b/chip/it83xx/keyboard_raw.c @@ -31,7 +31,10 @@ void keyboard_raw_init(void) #ifdef CONFIG_KEYBOARD_COL2_INVERTED /* KSO[2] is high, others are low. */ - IT83XX_KBS_KSOL = (1 << 2); + IT83XX_KBS_KSOL = BIT(2); + /* Enable KSO2's push-pull */ + IT83XX_KBS_KSOLGCTRL |= BIT(2); + IT83XX_KBS_KSOLGOEN |= BIT(2); #else /* KSO[7:0] pins low. */ IT83XX_KBS_KSOL = 0x00; diff --git a/chip/it83xx/registers.h b/chip/it83xx/registers.h index 8d2d8016bb..ddb2bbefbe 100644 --- a/chip/it83xx/registers.h +++ b/chip/it83xx/registers.h @@ -9,6 +9,7 @@ #define __CROS_EC_REGISTERS_H #include "common.h" +#include "compile_time_macros.h" #define __ram_code __attribute__((section(".ram_code"))) |