summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonjoon Lee <woojoo.lee@samsung.com>2015-10-30 16:12:31 +0900
committerChromeOS bot <3su6n15k.default@developer.gserviceaccount.com>2015-11-02 23:47:17 +0000
commit308713bace4a89797e88a07cb5ced0aa4e7afec5 (patch)
tree6a7cbd98126f31868a2967187bb003d9905a0539
parentefeb243f55252891eb797c38b226cd69dbdf421f (diff)
downloadchrome-ec-308713bace4a89797e88a07cb5ced0aa4e7afec5.tar.gz
keyboard: Add config to not disable keyscan when S3
Disabling keyscan makes KB pins GPIOs so that pins go floating, which causes a huge leakage on some chips. Keep these pins as an alternative function to prevent them from going floating. BUG=chrome-os-partner:46861 BRANCH=firmware-strago-7287.B TEST=manual on celes, measure power after lid close after 1 minute type 'lidclose' in ec console, verify not going wake-up with keyboard Change-Id: Ifab8d03e53d923a5f096b225baaee68632ff1931 Signed-off-by: Wonjoon Lee <woojoo.lee@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/309863 Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--common/keyboard_scan.c2
-rw-r--r--include/config.h8
2 files changed, 10 insertions, 0 deletions
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index e67fe81b1b..4208d11b03 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -117,7 +117,9 @@ void keyboard_scan_enable(int enable, enum kb_scan_disable_masks mask)
*/
task_wake(TASK_ID_KEYSCAN);
} else if (disable_scanning_mask && !old_disable_scanning) {
+#ifndef CONFIG_KEYBOARD_ALWAYS_KEYSCAN
keyboard_raw_drive_column(KEYBOARD_COLUMN_NONE);
+#endif
keyboard_clear_buffer();
}
}
diff --git a/include/config.h b/include/config.h
index 1c80144f6d..2ed82c1ac7 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1041,6 +1041,14 @@
#undef CONFIG_KEYBOARD_SUPPRESS_NOISE
/*
+ * Keep keyboard scan enabled even when the EC goes sleep mode / S3.
+ * Disabling keyscan makes KB pins GPIOs so that pins go floating, which
+ * causes a huge leakage on some chips. Keep these pins as an alternative
+ * function to prevent them from going floating.
+ */
+#undef CONFIG_KEYBOARD_ALWAYS_KEYSCAN
+
+/*
* Enable keyboard testing functionality. This enables a message which receives
* a list of keyscan events from the AP and processes them. This will cause
* keypresses to appear on the AP through the same mechanism as a normal