board/elm/led.c: Format with clang-format
BRANCH=none
TEST=none
#define LOW_BATTERY_PERMILLAGE 137
#define FULL_BATTERY_PERMILLAGE 937
-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);
@@ -111,8 +109,7 @@ static void elm_led_set_power(void)
bat_led_set(PWR_LED_ORANGE, 0);
} else if (chipset_in_state(CHIPSET_STATE_SUSPEND)) {
bat_led_set(PWR_LED_BLUE, 0);
- bat_led_set(PWR_LED_ORANGE,
- (blink_second & 3) ? 0 : 1);
+ bat_led_set(PWR_LED_ORANGE, (blink_second & 3) ? 0 : 1);
}
}
@@ -135,7 +132,8 @@ static void elm_led_set_battery(void)
/* Make the percentage approximate to UI shown */
remaining_capacity = *(int *)host_get_memmap(EC_MEMMAP_BATT_CAP);
full_charge_capacity = *(int *)host_get_memmap(EC_MEMMAP_BATT_LFCC);
- permillage = !full_charge_capacity ? 0 :
+ permillage = !full_charge_capacity ?
+ 0 :
(1000 * remaining_capacity) / full_charge_capacity;
switch (charge_get_state()) {
@@ -156,12 +154,10 @@ static void elm_led_set_battery(void)
bat_led_set(BAT_LED_BLUE, 0);
if (!chipset_in_state(CHIPSET_STATE_ANY_OFF) &&
permillage <= CRITICAL_LOW_BATTERY_PERMILLAGE)
- bat_led_set(BAT_LED_ORANGE,
- (blink_second & 1) ? 0 : 1);
+ bat_led_set(BAT_LED_ORANGE, (blink_second & 1) ? 0 : 1);
else if (!chipset_in_state(CHIPSET_STATE_ANY_OFF) &&
permillage <= LOW_BATTERY_PERMILLAGE)
- bat_led_set(BAT_LED_ORANGE,
- (blink_second & 3) ? 0 : 1);
+ bat_led_set(BAT_LED_ORANGE, (blink_second & 3) ? 0 : 1);
else
bat_led_set(BAT_LED_ORANGE, 0);
break;
