From 76d2b9b1e47ba721d83ada33f18a1aab28a80ea7 Mon Sep 17 00:00:00 2001 From: wen zhang Date: Fri, 12 May 2023 01:29:00 +0800 Subject: battery: Deprecate CONFIG_BATTERY_LEVEL_NEAR_FULL Atlas, coral, corori, eve, morphius, primus, and rammus are setting CONFIG_BATTERY_LEVEL_NEAR_FULL to custom values. This causes their LEDs show 'full' while the display battery percentages are still < 100%. We'll make these boards define CONFIG_BATT_HOST_FULL_FACTOR, instead. And fix LED dts for some zephyr projects. BUG=b:280818345 TEST=build pass Change-Id: I98f97798ea99cc812671d5b31d64e92d55a1e05a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4523043 Commit-Queue: wen zhang Tested-by: wen zhang Reviewed-by: Daisuke Nojiri --- board/wormdingler/led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/wormdingler/led.c') diff --git a/board/wormdingler/led.c b/board/wormdingler/led.c index 438b2cae33..b1e819a92f 100644 --- a/board/wormdingler/led.c +++ b/board/wormdingler/led.c @@ -91,7 +91,7 @@ static void board_led_set_battery(void) /* battery capa <= 5%, Red */ color = LED_RED; } else if (percent > BATTERY_LEVEL_CRITICAL && - percent < BATTERY_LEVEL_NEAR_FULL) { + percent < CONFIG_BATT_HOST_FULL_FACTOR) { /* 5% < battery capa < 97%, Orange */ color = LED_AMBER; } else { -- cgit v1.2.1