summaryrefslogtreecommitdiff
path: root/board/hammer/board.h
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-05-30 15:55:57 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-06-06 05:00:49 -0700
commit65d87bf9f0ef9b084d91ed44eda58b7463c82b48 (patch)
tree64bcafd6797a3a60bc9c5a7e2164688ad9bb7a38 /board/hammer/board.h
parent8290d879dab1fbba805cfcdb4f2409bdee803dc6 (diff)
downloadchrome-ec-65d87bf9f0ef9b084d91ed44eda58b7463c82b48.tar.gz
whiskers: Expose a switch for tablet mode
With this, whiskers exposes a tablet mode switch to inform the lid when the base is flipped around. We take this opportunity to clean up a bit whiskers/keyboard code: - Use tablet mode switch instead of lid switch - Refactor usb_hid_keyboard.c to accept either assistant key or tablet mode switch, or both. - Remove bit-field usage in HID report struct, and instead, generalize with an "extra" field that can be used for additional key/switches. BRANCH=none BUG=b:73133611 TEST=Flash whiskers, see that tablet mode events are sent when a magnet approaches the hall sensor. Change-Id: Ibf43bb04fdc867d18d9f318388d1ebd17b49d47f Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1077915 Reviewed-by: Wei-Han Chen <stimim@chromium.org>
Diffstat (limited to 'board/hammer/board.h')
-rw-r--r--board/hammer/board.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/hammer/board.h b/board/hammer/board.h
index 0f84c53d39..aa5678f5d2 100644
--- a/board/hammer/board.h
+++ b/board/hammer/board.h
@@ -231,8 +231,10 @@
#ifdef BOARD_WHISKERS
#define CONFIG_LED_DRIVER_LM3630A
-#define CONFIG_LID_SWITCH
-#define CONFIG_USB_INHIBIT_CONNECT
+#define CONFIG_TABLET_MODE
+#define CONFIG_TABLET_SWITCH
+#define TABLET_MODE_GPIO_L GPIO_TABLET_MODE_L
+#define CONFIG_KEYBOARD_TABLET_MODE_SWITCH
/* Enable control of SPI over USB */
#define CONFIG_USB_SPI
#define CONFIG_SPI_MASTER