From 1b4030c9ea2e44ff06e29d69206c048e49ba2170 Mon Sep 17 00:00:00 2001 From: Devin Lu Date: Mon, 27 Jul 2020 10:23:51 +0800 Subject: Jinlon: Re-scale power LED pulsing duty cycle To save more battery life for S0ix, this patch re-scale power led pulsing cycle with 1.6s off, 0.4s on. BUG=b:161569874 BRANCH=firmware-hatch-12672.B TEST=Make sure power LED pulsing cycle is 1.6s off, 0.4s on. Signed-off-by: Devin Lu Change-Id: Ia791d0a85a51bfe02071d6537b8ded408367c4e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2319488 Reviewed-by: Tim Wawrzynczak --- board/jinlon/led.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/board/jinlon/led.c b/board/jinlon/led.c index 60e54a505e..18dfb67f78 100644 --- a/board/jinlon/led.c +++ b/board/jinlon/led.c @@ -2,7 +2,7 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * - * Power and battery LED control for Dratini/Dragonair + * Power and battery LED control for Jinlon */ #include "battery.h" @@ -23,6 +23,7 @@ #define LED_TICKS_PER_CYCLE 10 #define LED_ON_TICKS 5 +#define POWER_LED_ON_TICKS 2 const enum ec_led_id supported_led_ids[] = { EC_LED_ID_LEFT_LED, @@ -200,7 +201,7 @@ static void led_set_power(void) else if (chipset_in_state(CHIPSET_STATE_SUSPEND | CHIPSET_STATE_STANDBY)) led_set_color_power((power_tick % - LED_TICKS_PER_CYCLE < LED_ON_TICKS) ? + LED_TICKS_PER_CYCLE < POWER_LED_ON_TICKS) ? LED_WHITE : LED_OFF); else led_set_color_power(LED_OFF); -- cgit v1.2.1