summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2020-07-27 10:23:51 +0800
committerCommit Bot <commit-bot@chromium.org>2020-07-28 23:19:01 +0000
commit22a2f5e8d27551365a92de69ab54c4730b303802 (patch)
treeb0f8298838b132d9a437761950c45b6a21e66090
parentc8f9edd807133b07b988936bf68216bc33092aa0 (diff)
downloadchrome-ec-22a2f5e8d27551365a92de69ab54c4730b303802.tar.gz
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 <Devin.Lu@quantatw.com> Change-Id: Ia791d0a85a51bfe02071d6537b8ded408367c4e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2319488 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> (cherry picked from commit 1b4030c9ea2e44ff06e29d69206c048e49ba2170) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2321823 Tested-by: Shelley Chen <shchen@chromium.org> Reviewed-by: Shelley Chen <shchen@chromium.org> Commit-Queue: Shelley Chen <shchen@chromium.org>
-rw-r--r--board/jinlon/led.c5
1 files 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);