common/led_policy_std.c: Format with clang-format
BRANCH=none
TEST=none
#define POWER_LED_OFF 0
#endif
-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);
@@ -108,15 +108,18 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)
case EC_LED_ID_BATTERY_LED:
gpio_set_level(GPIO_BAT_LED_RED,
(brightness[EC_LED_COLOR_RED] != 0) ?
- BAT_LED_ON : BAT_LED_OFF);
+ BAT_LED_ON :
+ BAT_LED_OFF);
gpio_set_level(GPIO_BAT_LED_GREEN,
(brightness[EC_LED_COLOR_GREEN] != 0) ?
- BAT_LED_ON : BAT_LED_OFF);
+ BAT_LED_ON :
+ BAT_LED_OFF);
break;
case EC_LED_ID_POWER_LED:
gpio_set_level(GPIO_POWER_LED,
(brightness[EC_LED_COLOR_WHITE] != 0) ?
- POWER_LED_ON : POWER_LED_OFF);
+ POWER_LED_ON :
+ POWER_LED_OFF);
break;
default:
return EC_ERROR_UNKNOWN;
@@ -163,11 +166,11 @@ static void std_led_set_battery(void)
break;
case PWR_STATE_DISCHARGE:
if (charge_get_percent() < 3)
- bat_led_set_color((battery_second & 1)
- ? LED_OFF : LED_AMBER);
+ bat_led_set_color((battery_second & 1) ? LED_OFF :
+ LED_AMBER);
else if (charge_get_percent() < 10)
- bat_led_set_color((battery_second & 3)
- ? LED_OFF : LED_AMBER);
+ bat_led_set_color((battery_second & 3) ? LED_OFF :
+ LED_AMBER);
else
bat_led_set_color(LED_OFF);
break;
@@ -179,8 +182,8 @@ static void std_led_set_battery(void)
break;
case PWR_STATE_IDLE: /* External power connected in IDLE. */
if (chflags & CHARGE_FLAG_FORCE_IDLE)
- bat_led_set_color(
- (battery_second & 0x2) ? LED_GREEN : LED_AMBER);
+ bat_led_set_color((battery_second & 0x2) ? LED_GREEN :
+ LED_AMBER);
else
bat_led_set_color(LED_GREEN);
break;
