summaryrefslogtreecommitdiff
path: root/board/hammer/board.c
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2019-08-08 09:56:09 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-16 05:43:14 +0000
commit2a6b114c3aa1e24f2fc060bd36e1187faaae073a (patch)
tree39e1e3b1e6116505418dc9cafd08dad6c16bd32d /board/hammer/board.c
parent623b89a51152d59bdf82dfdfcfcfb4c76c52a884 (diff)
downloadchrome-ec-2a6b114c3aa1e24f2fc060bd36e1187faaae073a.tar.gz
hammer: Add magnemite board
A close hammer derivative. BRANCH=none BUG=b:138968914 TEST=make BOARD=magnemite -j Flash into staff, see the board boot: util/flash_ec --board=magnemite --port=9000 Change-Id: Ibe5c3f4b0fb4a31d4667d5dc4d76a691b0e64e39 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741599 Reviewed-by: Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'board/hammer/board.c')
-rw-r--r--board/hammer/board.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/hammer/board.c b/board/hammer/board.c
index fe50321fa9..aec8f457f4 100644
--- a/board/hammer/board.c
+++ b/board/hammer/board.c
@@ -85,6 +85,7 @@ void usb_spi_board_enable(struct usb_spi_config const *config) {}
void usb_spi_board_disable(struct usb_spi_config const *config) {}
#endif /* !HAS_SPI_TOUCHPAD */
+#ifdef CONFIG_I2C
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
{"master", I2C_PORT_MASTER, 400,
@@ -95,6 +96,7 @@ const struct i2c_port_t i2c_ports[] = {
#endif
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
+#endif
#ifdef BOARD_STAFF
#define KBLIGHT_PWM_FREQ 100 /* Hz */
@@ -243,6 +245,7 @@ int board_has_keyboard_backlight(void)
return has_keyboard_backlight;
}
+#ifndef HAS_NO_TOUCHPAD
/* Reset the touchpad, mainly used to recover it from malfunction. */
void board_touchpad_reset(void)
{
@@ -258,6 +261,7 @@ void board_touchpad_reset(void)
msleep(10);
#endif
}
+#endif /* !HAS_NO_TOUCHPAD */
#ifdef CONFIG_KEYBOARD_TABLET_MODE_SWITCH
static void board_tablet_mode_change(void)