summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-05-14 10:27:14 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-14 22:53:49 +0000
commit0869221e4fe556a031e0a82574c9979ea5401090 (patch)
tree26d7cc868e44d38c9d7b2130012019cbf6b5bfe2
parent6d01f2e16981710f1b07d2a02ea6edb2d61ff9b4 (diff)
downloadchrome-ec-0869221e4fe556a031e0a82574c9979ea5401090.tar.gz
samus: add PD MCU interrupt signal to gpio list
Add PD MCU interrupt signal to gpio list, currently with a dummy interrupt function which prints a message to let us know it is occuring. BUG=chrome-os-partner:28721 BRANCH=none TEST=none Change-Id: I1fab016b84b1abaced905e0ea0bd35dbd67b30bb Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/199792 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/samus/board.c9
-rw-r--r--board/samus/board.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/board/samus/board.c b/board/samus/board.c
index bd5c52617b..fbee2bc72c 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -12,6 +12,7 @@
#include "capsense.h"
#include "charger.h"
#include "common.h"
+#include "console.h"
#include "driver/temp_sensor/tmp006.h"
#include "driver/als_isl29035.h"
#include "extpower.h"
@@ -36,6 +37,11 @@
#include "uart.h"
#include "util.h"
+static void pd_mcu_interrupt(enum gpio_signal signal)
+{
+ ccprintf("PD interrupt!\n");
+}
+
/* GPIO signal list. Must match order from enum gpio_signal. */
const struct gpio_info gpio_list[] = {
/* Inputs with interrupt handlers are first for efficiency */
@@ -83,6 +89,9 @@ const struct gpio_info gpio_list[] = {
#else
{"CAPSENSE_INT_L", LM4_GPIO_N, (1<<0), GPIO_INPUT, NULL},
#endif
+ {"PD_MCU_INT_L", LM4_GPIO_J, (1<<5), GPIO_PULL_UP|
+ GPIO_INT_FALLING,
+ pd_mcu_interrupt},
/* Other inputs */
{"BOARD_VERSION1", LM4_GPIO_Q, (1<<5), GPIO_INPUT, NULL},
diff --git a/board/samus/board.h b/board/samus/board.h
index 655b74cd45..144a8b5a61 100644
--- a/board/samus/board.h
+++ b/board/samus/board.h
@@ -100,6 +100,7 @@ enum gpio_signal {
GPIO_UART0_RX, /* UART0 RX input */
GPIO_ACCEL_INT, /* Combined accelerometer input */
GPIO_CAPSENSE_INT_L, /* Capsense interrupt input */
+ GPIO_PD_MCU_INT_L, /* Interrupt signal from PD MCU */
/* Other inputs */
GPIO_BOARD_VERSION1, /* Board version stuffing resistor 1 */