diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 13:25:07 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-28 13:44:54 +0000 |
commit | 20f7b156d481e5ba89f26e7739fee02435fa9441 (patch) | |
tree | 9a01c99d644d09e222e68115293be59e4ab17067 /board/burnet/led.c | |
parent | e97139b3b115146ef6c31ce55a566b9ec595656e (diff) | |
download | chrome-ec-20f7b156d481e5ba89f26e7739fee02435fa9441.tar.gz |
board/burnet/led.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Ib3d4d90e365e544a4f68a4cc6911127f8fb03ef4
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728112
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'board/burnet/led.c')
-rw-r--r-- | board/burnet/led.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/board/burnet/led.c b/board/burnet/led.c index 06ae68609e..c705ebd42e 100644 --- a/board/burnet/led.c +++ b/board/burnet/led.c @@ -17,10 +17,8 @@ #define POWER_LED_ON 0 #define POWER_LED_OFF 1 -const enum ec_led_id supported_led_ids[] = { - EC_LED_ID_BATTERY_LED, - EC_LED_ID_POWER_LED -}; +const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED, + EC_LED_ID_POWER_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); @@ -28,7 +26,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) @@ -111,8 +109,7 @@ static void led_set_power(void) if (chipset_in_state(CHIPSET_STATE_ON)) led_set_color_power(LED_WHITE); else if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND)) - led_set_color_power( - (power_tick & 0x2) ? LED_WHITE : LED_OFF); + led_set_color_power((power_tick & 0x2) ? LED_WHITE : LED_OFF); else led_set_color_power(LED_OFF); } @@ -132,10 +129,10 @@ static void led_set_battery(void) */ if (!board_is_convertible()) { 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); + CHIPSET_STATE_STANDBY) && + charge_get_state() != PWR_STATE_CHARGE) { + led_set_color_battery(power_ticks++ & 0x2 ? LED_WHITE : + LED_OFF); return; } } @@ -164,8 +161,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); |