From 7198d0303c19291c6f4925fe19c54c6627dd4b4d Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Mon, 20 Oct 2014 14:15:01 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/224426 Reviewed-by: Bill Richardson --- board/ryu_p2/board.h | 1 + board/ryu_p2/ec.tasklist | 3 ++- 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 }; -- cgit v1.2.1