summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2021-08-23 15:53:01 -0700
committerCommit Bot <commit-bot@chromium.org>2021-09-10 19:07:03 +0000
commit431323a240bd98bf97012126d136dc2106febbf3 (patch)
tree7a60993550ebabc947a16c1086245782cae68e86
parent26c236e3cbaad22c24b3ee8b976223524fa16421 (diff)
downloadchrome-ec-431323a240bd98bf97012126d136dc2106febbf3.tar.gz
it8801: Allow configurable option to use RAW Keyboard
To avoid BOM stuffing options on RVP, it8801 discrete keyboard with I/O expander is added on RVP as an AIC in MECC1.1. This config allows MECC vendors to easily switch between RAW keyboard or discrete keyboard. BUG=b:197659347 BRANCH=none TEST=make buildall -j Change-Id: I3b55eff0f5a1582daf63fca955954b8a42c1b7b2 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115433 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Li Feng <li1.feng@intel.com>
-rw-r--r--driver/ioexpander/it8801.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/driver/ioexpander/it8801.c b/driver/ioexpander/it8801.c
index 165e88f1df..ea59aaa85c 100644
--- a/driver/ioexpander/it8801.c
+++ b/driver/ioexpander/it8801.c
@@ -26,7 +26,7 @@ static int it8801_read(int reg, int *data)
IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS, reg, data);
}
-static int it8801_write(int reg, int data)
+__maybe_unused static int it8801_write(int reg, int data)
{
return i2c_write8(IT8801_KEYBOARD_PWM_I2C_PORT,
IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS, reg, data);
@@ -60,6 +60,7 @@ static int it8801_check_vendor_id(void)
return EC_SUCCESS;
}
+#ifdef CONFIG_KEYBOARD_NOT_RAW
void keyboard_raw_init(void)
{
int ret;
@@ -195,6 +196,7 @@ void io_expander_it8801_interrupt(enum gpio_signal signal)
/* Wake the scan task */
task_wake(TASK_ID_KEYSCAN);
}
+#endif /* CONFIG_KEYBOARD_NOT_RAW */
static int it8801_ioex_read(int ioex, int reg, int *data)
{