From 0869221e4fe556a031e0a82574c9979ea5401090 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Wed, 14 May 2014 10:27:14 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/199792 Reviewed-by: Bill Richardson Reviewed-by: Vincent Palatin --- board/samus/board.c | 9 +++++++++ board/samus/board.h | 1 + 2 files changed, 10 insertions(+) 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 */ -- cgit v1.2.1