summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-03-26 13:18:39 -0700
committerChromeBot <chrome-bot@google.com>2013-03-27 11:35:20 -0700
commitc2b94fd184e6f5df5e5d8fe4018055a29a96a064 (patch)
tree7ccb95f13ca0cf5ff21b67687b4bb8fe30ad06d3 /board
parent0a2603e8ea234a9263a0a2e6be5daed362c12d72 (diff)
downloadchrome-ec-c2b94fd184e6f5df5e5d8fe4018055a29a96a064.tar.gz
Move files in preparation for merging keyboard_scan modules
This is part one of a series to merge the keyboard scan interface to be common across all platforms. This change just moves and renames files and APIs and removes some read code, and sets up protocol-specific CONFIG options. It makes the next CL which actually merges keyboard scanning easier to parse. BUG=chrome-os-partner:18360 BRANCH=none TEST=compile all boards; test keyboard on spring and link Change-Id: I815a40aae4e5d5f333b8501aff9656080533d913 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/46549 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/daisy/board.c2
-rw-r--r--board/daisy/board.h5
-rw-r--r--board/link/board.h1
-rw-r--r--board/mccroskey/board.h8
-rw-r--r--board/snow/board.c2
-rw-r--r--board/snow/board.h2
-rw-r--r--board/spring/board.h1
-rw-r--r--board/spring/usb_charging.c4
8 files changed, 15 insertions, 10 deletions
diff --git a/board/daisy/board.c b/board/daisy/board.c
index 7052ec68fc..f48faeb852 100644
--- a/board/daisy/board.c
+++ b/board/daisy/board.c
@@ -181,7 +181,7 @@ void configure_board(void)
gpio_set_level(GPIO_EC_INT, 1);
}
-void board_keyboard_suppress_noise(void)
+void keyboard_suppress_noise(void)
{
/* notify audio codec of keypress for noise suppression */
gpio_set_level(GPIO_CODEC_INT, 0);
diff --git a/board/daisy/board.h b/board/daisy/board.h
index f32d2e86a9..1d0a19e5bb 100644
--- a/board/daisy/board.h
+++ b/board/daisy/board.h
@@ -21,6 +21,8 @@
/* Optional features */
#define CONFIG_CHIPSET_GAIA
#define CONFIG_I2C
+#define CONFIG_KEYBOARD_PROTOCOL_MKBP
+#define CONFIG_KEYBOARD_SUPPRESS_NOISE
/* Allow dangerous commands all the time, since we don't have a write protect
* switch. */
@@ -108,9 +110,6 @@ enum gpio_signal {
void configure_board(void);
-/* Signal to the AP that keyboard scan data is available */
-void board_keyboard_suppress_noise(void);
-
/* Auto detect EC i2c host port */
int board_i2c_host_port(void);
diff --git a/board/link/board.h b/board/link/board.h
index a7b6f2ae60..f986f132a0 100644
--- a/board/link/board.h
+++ b/board/link/board.h
@@ -20,6 +20,7 @@
#define CONFIG_CHIPSET_X86
#define CONFIG_CONSOLE_CMDHELP
#define CONFIG_EXTPOWER_GPIO
+#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_LPC
#define CONFIG_ONEWIRE
#define CONFIG_ONEWIRE_LED
diff --git a/board/mccroskey/board.h b/board/mccroskey/board.h
index 095a95fc42..2641885b36 100644
--- a/board/mccroskey/board.h
+++ b/board/mccroskey/board.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -21,13 +21,15 @@
#define CONFIG_CONSOLE_UART 1
/* Debug features */
-#define CONFIG_PANIC_HELP
#define CONFIG_ASSERT_HELP
#define CONFIG_CONSOLE_CMDHELP
-
+#define CONFIG_PANIC_HELP
#undef CONFIG_TASK_PROFILING
#define CONFIG_WATCHDOG_HELP
+/* Optional features */
+#define CONFIG_KEYBOARD_PROTOCOL_MKBP
+
/* use STOP mode when we have nothing to do */
/*
* FIXME(dhendrix): This causes the UART to drop characters and likely
diff --git a/board/snow/board.c b/board/snow/board.c
index a70a112b79..83a628ce7c 100644
--- a/board/snow/board.c
+++ b/board/snow/board.c
@@ -177,7 +177,7 @@ void configure_board_late(void)
#endif
}
-void board_keyboard_suppress_noise(void)
+void keyboard_suppress_noise(void)
{
/* notify audio codec of keypress for noise suppression */
gpio_set_level(GPIO_CODEC_INT, 0);
diff --git a/board/snow/board.h b/board/snow/board.h
index fe9883e7b1..010c2cde01 100644
--- a/board/snow/board.h
+++ b/board/snow/board.h
@@ -25,6 +25,8 @@
#define CONFIG_HOST_COMMAND_STATUS
#define CONFIG_I2C
#define CONFIG_I2C_ARBITRATION
+#define CONFIG_KEYBOARD_PROTOCOL_MKBP
+#define CONFIG_KEYBOARD_SUPPRESS_NOISE
#undef CONFIG_TASK_PROFILING
#define CONFIG_WATCHDOG_HELP
diff --git a/board/spring/board.h b/board/spring/board.h
index 31043b0f13..4387162df9 100644
--- a/board/spring/board.h
+++ b/board/spring/board.h
@@ -23,6 +23,7 @@
#define CONFIG_CHIPSET_GAIA
#define CONFIG_HOST_COMMAND_STATUS
#define CONFIG_I2C
+#define CONFIG_KEYBOARD_PROTOCOL_MKBP
#undef CONFIG_TASK_PROFILING
#define CONFIG_WATCHDOG_HELP
diff --git a/board/spring/usb_charging.c b/board/spring/usb_charging.c
index e57e6ebd46..72fcf54335 100644
--- a/board/spring/usb_charging.c
+++ b/board/spring/usb_charging.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -12,7 +12,7 @@
#include "console.h"
#include "hooks.h"
#include "gpio.h"
-#include "keyboard_scan.h"
+#include "keyboard_protocol.h"
#include "pmu_tpschrome.h"
#include "registers.h"
#include "smart_battery.h"