diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 13:16:13 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-29 02:08:14 +0000 |
commit | bb57622ac82e5218fc312ffa76d8732c1ecc0dc4 (patch) | |
tree | 14f2b42960a969b1ba91ff4a40dcea5c02ed9bce | |
parent | 94b988ece617dcfe24f8bff4d3f02ac0bc8c3d43 (diff) | |
download | chrome-ec-bb57622ac82e5218fc312ffa76d8732c1ecc0dc4.tar.gz |
baseboard/intelrvp/led_states.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Ic490b9cb0912e2a3694d36665c8fbb537657b287
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3727901
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | baseboard/intelrvp/led_states.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/baseboard/intelrvp/led_states.c b/baseboard/intelrvp/led_states.c index 5f8768bdd9..18126b5314 100644 --- a/baseboard/intelrvp/led_states.c +++ b/baseboard/intelrvp/led_states.c @@ -15,11 +15,11 @@ #include "led_common.h" #include "led_states.h" -#define CPRINTS(format, args...) cprints(CC_GPIO, format, ## args) +#define CPRINTS(format, args...) cprints(CC_GPIO, format, ##args) static enum led_states led_get_state(void) { - int charge_lvl; + int charge_lvl; enum led_states new_state = LED_NUM_STATES; switch (charge_get_state()) { @@ -88,14 +88,14 @@ static void led_update_battery(void) ticks = 0; period = led_bat_state_table[led_state][LED_PHASE_0].time + - led_bat_state_table[led_state][LED_PHASE_1].time; - + led_bat_state_table[led_state][LED_PHASE_1].time; } /* If this state is undefined, turn the LED off */ if (period == 0) { CPRINTS("Undefined LED behavior for battery state %d," - "turning off LED", led_state); + "turning off LED", + led_state); led_set_color_battery(LED_OFF); return; } @@ -104,8 +104,8 @@ static void led_update_battery(void) * Determine which phase of the state table to use. The phase is * determined if it falls within first phase time duration. */ - phase = ticks < led_bat_state_table[led_state][LED_PHASE_0].time ? - 0 : 1; + phase = ticks < led_bat_state_table[led_state][LED_PHASE_0].time ? 0 : + 1; ticks = (ticks + 1) % period; /* Set the color for the given state and phase */ @@ -141,14 +141,14 @@ static void led_update_power(void) ticks = 0; period = led_pwr_state_table[led_state][LED_PHASE_0].time + - led_pwr_state_table[led_state][LED_PHASE_1].time; - + led_pwr_state_table[led_state][LED_PHASE_1].time; } /* If this state is undefined, turn the LED off */ if (period == 0) { CPRINTS("Undefined LED behavior for power state %d," - "turning off LED", led_state); + "turning off LED", + led_state); led_set_color_power(LED_OFF); return; } @@ -157,8 +157,8 @@ static void led_update_power(void) * Determine which phase of the state table to use. The phase is * determined if it falls within first phase time duration. */ - phase = ticks < led_pwr_state_table[led_state][LED_PHASE_0].time ? - 0 : 1; + phase = ticks < led_pwr_state_table[led_state][LED_PHASE_0].time ? 0 : + 1; ticks = (ticks + 1) % period; /* Set the color for the given state and phase */ |