diff options
author | Vic Yang <victoryang@chromium.org> | 2013-07-13 01:06:40 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-15 14:11:13 -0700 |
commit | a8cda83a2771a261e6ce1b37e61a14ed8407cd62 (patch) | |
tree | bf9807627a4e73fff29894092b46f58e82ac8a6c | |
parent | 20e33095794d0a9957a3a0f768eb9560243c6063 (diff) | |
download | chrome-ec-a8cda83a2771a261e6ce1b37e61a14ed8407cd62.tar.gz |
spring: lower LED brightness to save power
Lower LED brightness:
- Green: 0x80 -> 0x10
- Yellow: 0x80 -> 0x40 (looks equivalently bright to green @ 0x10)
- Red: Not changed since it's an error condition
BUG=chrome-os-partner:20768
TEST=Build success
BRANCH=Spring
Original-Change-Id: Ib80b4f5c746163d98a09e21246ea97a6aeb2c054
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61672
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit 1f6e5f8a1e074bd91acd3fc0b3de268495199c10)
Change-Id: I8f37cfa79d9fd30f503318e0913f4c12c1737219
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61852
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | common/led_lp5562.c | 6 | ||||
-rw-r--r-- | include/lp5562.h | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/common/led_lp5562.c b/common/led_lp5562.c index 420f391ce5..de5abbd666 100644 --- a/common/led_lp5562.c +++ b/common/led_lp5562.c @@ -23,9 +23,9 @@ /* We use yellow LED instead of blue LED. Re-map colors here. */ #define LED_COLOR_NONE LP5562_COLOR_NONE -#define LED_COLOR_GREEN LP5562_COLOR_GREEN -#define LED_COLOR_YELLOW LP5562_COLOR_BLUE -#define LED_COLOR_RED LP5562_COLOR_RED +#define LED_COLOR_GREEN LP5562_COLOR_GREEN(0x10) +#define LED_COLOR_YELLOW LP5562_COLOR_BLUE(0x40) +#define LED_COLOR_RED LP5562_COLOR_RED(0x80) /* LED states */ enum led_state_t { diff --git a/include/lp5562.h b/include/lp5562.h index f0d32d495e..aaa32e5fb0 100644 --- a/include/lp5562.h +++ b/include/lp5562.h @@ -28,10 +28,11 @@ #define LP5562_REG_ENG_PROG(n) (0x10 + ((n)-1) * 0x20) +/* Brightness range: 0x00 - 0xff */ #define LP5562_COLOR_NONE 0x000000 -#define LP5562_COLOR_RED 0x800000 -#define LP5562_COLOR_GREEN 0x008000 -#define LP5562_COLOR_BLUE 0x000080 +#define LP5562_COLOR_RED(b) (0x010000 * (b)) +#define LP5562_COLOR_GREEN(b) (0x000100 * (b)) +#define LP5562_COLOR_BLUE(b) (0x000001 * (b)) #define LP5562_ENG_SEL_NONE 0x0 #define LP5562_ENG_SEL_1 0x1 |