diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 13:41:11 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-01 01:18:24 +0000 |
commit | 1f01679d576add340563ec910d49b1e3b3b25ede (patch) | |
tree | 3688dec64b85d2cb232310906348610da9a74fcc | |
parent | 3ddbabeb2101a219f041699d97272d5f301c6480 (diff) | |
download | chrome-ec-1f01679d576add340563ec910d49b1e3b3b25ede.tar.gz |
board/kappa/led.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: If442dafa2a1a885b8b992f2f0d949eb96e7a7509
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728527
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | board/kappa/led.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/board/kappa/led.c b/board/kappa/led.c index 5b65d7b948..7caac3dfef 100644 --- a/board/kappa/led.c +++ b/board/kappa/led.c @@ -14,7 +14,7 @@ #define BAT_LED_ON 0 #define BAT_LED_OFF 1 -const enum ec_led_id supported_led_ids[] = {EC_LED_ID_BATTERY_LED}; +const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); @@ -22,7 +22,7 @@ enum led_color { LED_OFF = 0, LED_AMBER, LED_WHITE, - LED_COLOR_COUNT /* Number of colors, not a color itself */ + LED_COLOR_COUNT /* Number of colors, not a color itself */ }; static int led_set_color_battery(enum led_color color) @@ -87,11 +87,10 @@ static void led_set_battery(void) battery_ticks++; /* override battery led for system suspend */ - if (chipset_in_state(CHIPSET_STATE_SUSPEND | - CHIPSET_STATE_STANDBY) && + if (chipset_in_state(CHIPSET_STATE_SUSPEND | CHIPSET_STATE_STANDBY) && charge_get_state() != PWR_STATE_CHARGE) { - led_set_color_battery(power_ticks++ & 0x2 ? - LED_WHITE : LED_OFF); + led_set_color_battery(power_ticks++ & 0x2 ? LED_WHITE : + LED_OFF); return; } @@ -119,8 +118,8 @@ static void led_set_battery(void) led_set_color_battery(LED_OFF); break; case PWR_STATE_ERROR: - led_set_color_battery( - (battery_ticks % 0x2) ? LED_WHITE : LED_OFF); + led_set_color_battery((battery_ticks % 0x2) ? LED_WHITE : + LED_OFF); break; case PWR_STATE_CHARGE_NEAR_FULL: led_set_color_battery(LED_WHITE); |