diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 13:31:36 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-28 09:31:39 +0000 |
commit | 396d4d7f5bf60193b8e3eea8c742d8bffc7c704e (patch) | |
tree | 58e08d77c2a8d72f853feeb0438c601c5817c7c0 /board/drawcia | |
parent | 965d85d46abd486abe1f0173c7a7902c00f3f1f6 (diff) | |
download | chrome-ec-396d4d7f5bf60193b8e3eea8c742d8bffc7c704e.tar.gz |
board/drawcia/led.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I0430ed3b68ed206c3bb6e8d812a475184c25ef4f
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728238
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'board/drawcia')
-rw-r--r-- | board/drawcia/led.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/board/drawcia/led.c b/board/drawcia/led.c index ed22fc29ba..3d743265f4 100644 --- a/board/drawcia/led.c +++ b/board/drawcia/led.c @@ -18,10 +18,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); @@ -29,7 +27,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) @@ -127,9 +125,9 @@ static void led_set_battery(void) */ if (get_cbi_fw_config_tablet_mode() == TABLET_MODE_ABSENT) { if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND) && - charge_get_state() != PWR_STATE_CHARGE) { - led_set_color_battery(power_ticks++ & 0x2 ? - LED_WHITE : LED_OFF); + charge_get_state() != PWR_STATE_CHARGE) { + led_set_color_battery(power_ticks++ & 0x2 ? LED_WHITE : + LED_OFF); return; } } @@ -158,8 +156,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); @@ -186,8 +184,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); } |