diff options
author | Vic Yang <victoryang@chromium.org> | 2014-10-21 16:19:17 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-22 04:05:33 +0000 |
commit | 42c31912c754370c5af41a8bdfac65f9bfd849f6 (patch) | |
tree | 174bf5948c8103dc917d2051d9ff938120c5d228 | |
parent | 8cd9856cf8ef193ea094cf91c67e9aff25b2b521 (diff) | |
download | chrome-ec-42c31912c754370c5af41a8bdfac65f9bfd849f6.tar.gz |
ryu: enable lid switch
This is needed for inductive charging to work.
BRANCH=None
BUG=chrome-os-partner:31392
TEST=On Ryu, close the lid and check BASE_CHARGE_VDD_EN is toggled.
TEST=Open the lid and see the AP booting.
Change-Id: Ib153c08a803088b832c7d65261c71605c3378d5f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224804
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | board/ryu/board.c | 7 | ||||
-rw-r--r-- | board/ryu/board.h | 2 | ||||
-rw-r--r-- | board/ryu/gpio.inc | 2 | ||||
-rw-r--r-- | board/ryu_p2/board.c | 7 | ||||
-rw-r--r-- | board/ryu_p2/board.h | 2 | ||||
-rw-r--r-- | board/ryu_p2/gpio.inc | 2 |
6 files changed, 6 insertions, 16 deletions
diff --git a/board/ryu/board.c b/board/ryu/board.c index 6129e8dbc1..e8f770a7ed 100644 --- a/board/ryu/board.c +++ b/board/ryu/board.c @@ -15,6 +15,7 @@ #include "host_command.h" #include "i2c.h" #include "inductive_charging.h" +#include "lid_switch.h" #include "power.h" #include "power_button.h" #include "registers.h" @@ -197,9 +198,3 @@ const struct battery_info *battery_get_info(void) { return &info; } - -/* Fake lid switch */ -int lid_is_open(void) -{ - return 1; -} diff --git a/board/ryu/board.h b/board/ryu/board.h index 74338bddfc..0ce0d59816 100644 --- a/board/ryu/board.h +++ b/board/ryu/board.h @@ -30,7 +30,7 @@ #define CONFIG_ADC #define CONFIG_HW_CRC #define CONFIG_I2C -#undef CONFIG_LID_SWITCH +#define CONFIG_LID_SWITCH #define CONFIG_VBOOT_HASH #undef CONFIG_WATCHDOG_HELP #undef CONFIG_TASK_PROFILING diff --git a/board/ryu/gpio.inc b/board/ryu/gpio.inc index 12f683b7a1..c9f3a9d167 100644 --- a/board/ryu/gpio.inc +++ b/board/ryu/gpio.inc @@ -10,7 +10,7 @@ GPIO(CHGR_ACOK, A, 2, GPIO_INT_BOTH | GPIO_PULL_UP, vbus_evt) GPIO(BC_TEMP_ALERT_L, A, 13, GPIO_INT_FALLING, unhandled_evt) GPIO(POWER_BUTTON_L, C, 13, GPIO_INT_BOTH, power_button_interrupt) /* active high, the name is for compatibility with existing code */ GPIO(USBC_BC12_INT_L, D, 11, GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt) -GPIO(LID_OPEN, E, 1, GPIO_INT_BOTH | GPIO_PULL_UP, unhandled_evt) +GPIO(LID_OPEN, E, 1, GPIO_INT_BOTH | GPIO_PULL_UP, lid_interrupt) GPIO(CHARGE_DONE, E, 6, GPIO_INT_BOTH, inductive_charging_interrupt) GPIO(LB_INT_L, E, 7, GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt) GPIO(LIGHTBAR_EN_L, E, 8, GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt) diff --git a/board/ryu_p2/board.c b/board/ryu_p2/board.c index 7da2581f55..84874695c4 100644 --- a/board/ryu_p2/board.c +++ b/board/ryu_p2/board.c @@ -15,6 +15,7 @@ #include "host_command.h" #include "i2c.h" #include "inductive_charging.h" +#include "lid_switch.h" #include "power.h" #include "power_button.h" #include "registers.h" @@ -172,9 +173,3 @@ const struct battery_info *battery_get_info(void) { return &info; } - -/* Fake lid switch */ -int lid_is_open(void) -{ - return 1; -} diff --git a/board/ryu_p2/board.h b/board/ryu_p2/board.h index bab9370ac7..d4360ee4cd 100644 --- a/board/ryu_p2/board.h +++ b/board/ryu_p2/board.h @@ -29,7 +29,7 @@ #define CONFIG_ADC #define CONFIG_HW_CRC #define CONFIG_I2C -#undef CONFIG_LID_SWITCH +#define CONFIG_LID_SWITCH #define CONFIG_VBOOT_HASH #undef CONFIG_WATCHDOG_HELP #undef CONFIG_TASK_PROFILING diff --git a/board/ryu_p2/gpio.inc b/board/ryu_p2/gpio.inc index 0c1df6abc0..9f662b5d4a 100644 --- a/board/ryu_p2/gpio.inc +++ b/board/ryu_p2/gpio.inc @@ -10,7 +10,7 @@ GPIO(CHGR_ACOK, D, 4, GPIO_INT_BOTH | GPIO_PULL_UP, vbus_evt) GPIO(BC_TEMP_ALERT_L, C, 5, GPIO_INT_FALLING, unhandled_evt) GPIO(POWER_BUTTON_L, C, 13, GPIO_INT_BOTH, power_button_interrupt) /* active high, the name is for compatibility with existing code */ GPIO(USBC_BC12_INT_L, D, 11, GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt) -GPIO(LID_OPEN, E, 1, GPIO_INT_BOTH | GPIO_PULL_UP, unhandled_evt) +GPIO(LID_OPEN, E, 1, GPIO_INT_BOTH | GPIO_PULL_UP, lid_interrupt) GPIO(CHARGE_DONE, E, 6, GPIO_INT_BOTH, inductive_charging_interrupt) GPIO(LB_INT_L, E, 7, GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt) GPIO(LIGHTBAR_EN_L, E, 8, GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt) |