board/elemi/led.c: Format with clang-format
BRANCH=none
TEST=none
@@ -40,10 +40,7 @@ enum led_color {
LED_COLOR_COUNT /* Number of colors, not a color itself */
};
-enum led_port {
- RIGHT_PORT = 0,
- LEFT_PORT
-};
+enum led_port { RIGHT_PORT = 0, LEFT_PORT };
static void led_set_color_battery(int port, enum led_color color)
{
@@ -145,13 +142,12 @@ static void led_set_battery(void)
*/
if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND) &&
charge_get_state() != PWR_STATE_CHARGE) {
-
suspend_ticks++;
- led_set_color_battery(RIGHT_PORT, suspend_ticks & 0x4 ?
- LED_WHITE : LED_OFF);
- led_set_color_battery(LEFT_PORT, suspend_ticks & 0x4 ?
- LED_WHITE : LED_OFF);
+ led_set_color_battery(
+ RIGHT_PORT, suspend_ticks & 0x4 ? LED_WHITE : LED_OFF);
+ led_set_color_battery(
+ LEFT_PORT, suspend_ticks & 0x4 ? LED_WHITE : LED_OFF);
return;
}
@@ -165,9 +161,12 @@ static void led_set_battery(void)
case PWR_STATE_DISCHARGE:
if (led_auto_control_is_enabled(EC_LED_ID_RIGHT_LED)) {
if (charge_get_percent() < 10)
- led_set_color_battery(RIGHT_PORT,
- (battery_ticks % LED_TICKS_PER_CYCLE
- < LED_ON_TICKS) ? LED_WHITE : LED_OFF);
+ led_set_color_battery(
+ RIGHT_PORT,
+ (battery_ticks % LED_TICKS_PER_CYCLE <
+ LED_ON_TICKS) ?
+ LED_WHITE :
+ LED_OFF);
else
led_set_color_battery(RIGHT_PORT, LED_OFF);
}
@@ -176,17 +175,19 @@ static void led_set_battery(void)
led_set_color_battery(LEFT_PORT, LED_OFF);
break;
case PWR_STATE_ERROR:
- set_active_port_color((battery_ticks & 0x2) ?
- LED_WHITE : LED_OFF);
+ set_active_port_color((battery_ticks & 0x2) ? LED_WHITE :
+ LED_OFF);
break;
case PWR_STATE_CHARGE_NEAR_FULL:
set_active_port_color(LED_WHITE);
break;
case PWR_STATE_IDLE: /* External power connected in IDLE */
if (chflags & CHARGE_FLAG_FORCE_IDLE)
- set_active_port_color((battery_ticks %
- LED_TICKS_PER_CYCLE < LED_ON_TICKS) ?
- LED_AMBER : LED_OFF);
+ set_active_port_color(
+ (battery_ticks % LED_TICKS_PER_CYCLE <
+ LED_ON_TICKS) ?
+ LED_AMBER :
+ LED_OFF);
else
set_active_port_color(LED_WHITE);
break;
