diff options
author | mick_hsiao <mick_hsiao@compal.corp-partner.google.com> | 2023-03-08 13:44:00 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-09 04:57:19 +0000 |
commit | 56a4339c09fd16053aec075f22e24368d90531a1 (patch) | |
tree | 72145c1db5a35f3717996aaab02a899ad48e079e /board | |
parent | 3520ae42548e1f013e4e8382cc3cf877f346f561 (diff) | |
download | chrome-ec-56a4339c09fd16053aec075f22e24368d90531a1.tar.gz |
Omnigul: change LED color
change LED color due to hardware design
BUG=none
BRANCH=none
TEST=ectool led battery blue, LED works correctly
ectool led battery amber, LED works correctly
Change-Id: Idd99d4d1e5ced591d37c6d166ab86a4213016d6e
Signed-off-by: mick_hsiao <mick_hsiao@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4318611
Commit-Queue: Kyle Lin <kylelinck@google.com>
Code-Coverage: Kyle Lin <kylelinck@google.com>
Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
Reviewed-by: Kyle Lin <kylelinck@google.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/omnigul/board.h | 6 | ||||
-rw-r--r-- | board/omnigul/led.c | 22 |
2 files changed, 14 insertions, 14 deletions
diff --git a/board/omnigul/board.h b/board/omnigul/board.h index 73140b6fb3..0c7306a0b4 100644 --- a/board/omnigul/board.h +++ b/board/omnigul/board.h @@ -33,9 +33,9 @@ #undef CONFIG_LED_PWM_SOC_ON_COLOR #undef CONFIG_LED_PWM_SOC_SUSPEND_COLOR #undef CONFIG_LED_PWM_LOW_BATT_COLOR -#define CONFIG_LED_PWM_NEAR_FULL_COLOR EC_LED_COLOR_WHITE -#define CONFIG_LED_PWM_SOC_ON_COLOR EC_LED_COLOR_WHITE -#define CONFIG_LED_PWM_SOC_SUSPEND_COLOR EC_LED_COLOR_WHITE +#define CONFIG_LED_PWM_NEAR_FULL_COLOR EC_LED_COLOR_BLUE +#define CONFIG_LED_PWM_SOC_ON_COLOR EC_LED_COLOR_BLUE +#define CONFIG_LED_PWM_SOC_SUSPEND_COLOR EC_LED_COLOR_BLUE #define CONFIG_LED_PWM_LOW_BATT_COLOR EC_LED_COLOR_AMBER /* Sensors */ diff --git a/board/omnigul/led.c b/board/omnigul/led.c index 00368f553b..4f16615714 100644 --- a/board/omnigul/led.c +++ b/board/omnigul/led.c @@ -4,9 +4,9 @@ */ /* Brya specific PWM LED settings: there are 2 LEDs on each side of the board, - * each one can be controlled separately. The LED colors are white or amber, + * each one can be controlled separately. The LED colors are blue or amber, * and the default behavior is tied to the charging process: both sides are - * amber while charging the battery and white when the battery is charged. + * amber while charging the battery and blue when the battery is charged. */ #include "common.h" @@ -25,17 +25,17 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); /* - * We only have a white and an amber LED, so setting any other color results in + * We only have a blue and an amber LED, so setting any other color results in * both LEDs being off. Cap at 50% to save power. */ struct pwm_led_color_map led_color_map[EC_LED_COLOR_COUNT] = { - /* Amber, White */ - [EC_LED_COLOR_RED] = { 0, 0 }, [EC_LED_COLOR_GREEN] = { 0, 0 }, - [EC_LED_COLOR_BLUE] = { 0, 0 }, [EC_LED_COLOR_YELLOW] = { 0, 0 }, - [EC_LED_COLOR_WHITE] = { 0, 50 }, [EC_LED_COLOR_AMBER] = { 50, 0 }, + /* Amber, Blue */ + [EC_LED_COLOR_RED] = { 0, 0 }, [EC_LED_COLOR_GREEN] = { 0, 0 }, + [EC_LED_COLOR_BLUE] = { 0, 50 }, [EC_LED_COLOR_YELLOW] = { 0, 0 }, + [EC_LED_COLOR_WHITE] = { 0, 0 }, [EC_LED_COLOR_AMBER] = { 50, 0 }, }; -/* Two logical LEDs with amber and white channels. */ +/* Two logical LEDs with amber and blue channels. */ struct pwm_led pwm_leds[CONFIG_LED_PWM_COUNT] = { { .ch0 = PWM_CH_LED1, @@ -51,7 +51,7 @@ void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range) memset(brightness_range, '\0', sizeof(*brightness_range) * EC_LED_COLOR_COUNT); brightness_range[EC_LED_COLOR_AMBER] = 100; - brightness_range[EC_LED_COLOR_WHITE] = 100; + brightness_range[EC_LED_COLOR_BLUE] = 100; } int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) @@ -67,8 +67,8 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) return EC_ERROR_UNKNOWN; } - if (brightness[EC_LED_COLOR_WHITE]) - set_pwm_led_color(pwm_id, EC_LED_COLOR_WHITE); + if (brightness[EC_LED_COLOR_BLUE]) + set_pwm_led_color(pwm_id, EC_LED_COLOR_BLUE); else if (brightness[EC_LED_COLOR_AMBER]) set_pwm_led_color(pwm_id, EC_LED_COLOR_AMBER); else |