From 51fa74ec6fce5f5c7a9c03a79e73bb3eef032bd8 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Fri, 11 Mar 2016 17:27:18 +0800 Subject: oak: rev5: increase cycle time for LED in SUSPEND Increase LED blink cycle time to reduce power consumption on Oak rev5 with GlaDOS ID. BUG=chrome-os-partner:50317 TEST=`make EXTRA_CFLAGS=-DBOARD_REV=5 BOARD=oak -j` Change-Id: Ic00512434965471a82b94ef431e0ec88c9e4c0c3 Reviewed-on: https://chromium-review.googlesource.com/332346 Commit-Ready: Wei-Ning Huang Tested-by: Wei-Ning Huang Reviewed-by: Daniel Kurtz --- board/oak/led.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'board/oak') diff --git a/board/oak/led.c b/board/oak/led.c index bc0e9dde45..877f115a12 100644 --- a/board/oak/led.c +++ b/board/oak/led.c @@ -202,9 +202,16 @@ static void oak_led_set_battery(int board_version) bat_led_set(BAT_LED_GREEN, 0); else if (chipset_in_state(CHIPSET_STATE_ON)) bat_led_set(BAT_LED_GREEN, 1); - else if (chipset_in_state(CHIPSET_STATE_SUSPEND)) + else if (chipset_in_state(CHIPSET_STATE_SUSPEND)) { + int cycle_time = 4; + /* Oak rev5 with GlaDOS ID has a extremely power + * comsuming LED. Increase LED blink cycle time to reduce + * S3 power comsuption. */ + if (board_version >= OAK_REV5) + cycle_time = 10; bat_led_set(BAT_LED_GREEN, - (battery_second & 3) ? 0 : 1); + (battery_second % cycle_time) ? 0 : 1); + } /* BAT LED behavior: * Fully charged / idle: Off -- cgit v1.2.1