diff options
author | Vic Yang <victoryang@chromium.org> | 2014-10-20 14:15:01 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-22 00:30:46 +0000 |
commit | 7198d0303c19291c6f4925fe19c54c6627dd4b4d (patch) | |
tree | f15f82962c58743d0a4f5211da1fa3c381ca206a | |
parent | 00551f7331119b0dbde124c01810daeb9dcdd665 (diff) | |
download | chrome-ec-7198d0303c19291c6f4925fe19c54c6627dd4b4d.tar.gz |
ryu: enable lightbar on P2 boards
Ryu uses the same LEDs as Samus, so let's use the same brightness values
for them. Also, increase the stack size for console task so that
'lightbar' command doesn't cause stack overflow.
BRANCH=None
BUG=chrome-os-partner:32203
TEST=See lightbar in action on Ryu.
Change-Id: I89b61f6df2751c9dd6b40f9e374f01e1b0dfd504
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224426
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | board/ryu_p2/board.h | 1 | ||||
-rw-r--r-- | board/ryu_p2/ec.tasklist | 3 | ||||
-rw-r--r-- | common/lb_common.c | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/board/ryu_p2/board.h b/board/ryu_p2/board.h index 25993ccc01..bab9370ac7 100644 --- a/board/ryu_p2/board.h +++ b/board/ryu_p2/board.h @@ -71,6 +71,7 @@ #define I2C_PORT_EC I2C_PORT_SLAVE #define I2C_PORT_CHARGER I2C_PORT_MASTER #define I2C_PORT_BATTERY I2C_PORT_MASTER +#define I2C_PORT_LIGHTBAR I2C_PORT_MASTER /* slave address for host commands */ #ifdef HAS_TASK_HOSTCMD diff --git a/board/ryu_p2/ec.tasklist b/board/ryu_p2/ec.tasklist index 4e99996aee..431f3ba177 100644 --- a/board/ryu_p2/ec.tasklist +++ b/board/ryu_p2/ec.tasklist @@ -18,8 +18,9 @@ */ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_NOTEST(LIGHTBAR, lightbar_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ - TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(PD, pd_task, NULL, LARGER_TASK_STACK_SIZE) diff --git a/common/lb_common.c b/common/lb_common.c index 41617f1dff..6db3d9d445 100644 --- a/common/lb_common.c +++ b/common/lb_common.c @@ -62,7 +62,7 @@ static inline uint8_t controller_read(int ctrl_num, uint8_t reg) #define MAX_GREEN 0x30 #define MAX_BLUE 0x67 #endif -#ifdef BOARD_SAMUS +#if defined(BOARD_SAMUS) || defined(BOARD_RYU_P2) /* Samus uses completely different LEDs, so the numbers are different */ #define MAX_RED 0x4f #define MAX_GREEN 0x55 @@ -120,6 +120,9 @@ static const uint8_t led_to_isc[] = { 0x18, 0x15, 0x18, 0x15 }; #ifdef BOARD_SAMUS static const uint8_t led_to_isc[] = { 0x15, 0x18, 0x15, 0x18 }; #endif +#ifdef BOARD_RYU_P2 +static const uint8_t led_to_isc[] = { 0x18, 0x15, 0x18, 0x15 }; +#endif #ifdef BOARD_HOST /* For testing only */ static const uint8_t led_to_isc[] = { 0x15, 0x18, 0x15, 0x18 }; |