summaryrefslogtreecommitdiff
path: root/board/spherion/led.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:06:06 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-28 04:22:01 +0000
commit04c3e677e99015ea00e1e0fb44585f96e3b05273 (patch)
tree3e2e98a7bdfb84f08b8af43e0a927321ed244c42 /board/spherion/led.c
parentb4930688879db7a220605adfb4c70e32173205d2 (diff)
downloadchrome-ec-04c3e677e99015ea00e1e0fb44585f96e3b05273.tar.gz
board/spherion/led.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: Iec37cae59e5c3eeea7d9ce3ef733c8eb11eadfc0 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728946 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'board/spherion/led.c')
-rw-r--r--board/spherion/led.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/board/spherion/led.c b/board/spherion/led.c
index aad85d02c1..bd41fe24cb 100644
--- a/board/spherion/led.c
+++ b/board/spherion/led.c
@@ -16,19 +16,26 @@ __override const int led_charge_lvl_1 = 5;
__override const int led_charge_lvl_2 = 95;
__override struct led_descriptor
- led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = {
- [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
- [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
- [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
- [STATE_DISCHARGE_S0] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
- [STATE_DISCHARGE_S3] = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC},
- {LED_OFF, 3 * LED_ONE_SEC} },
- [STATE_DISCHARGE_S5] = {{LED_OFF, LED_INDEFINITE} },
- [STATE_BATTERY_ERROR] = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC},
- {LED_OFF, 1 * LED_ONE_SEC} },
- [STATE_FACTORY_TEST] = {{EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC},
- {EC_LED_COLOR_AMBER, 2 * LED_ONE_SEC} },
-};
+ led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = {
+ [STATE_CHARGING_LVL_1] = { { EC_LED_COLOR_AMBER,
+ LED_INDEFINITE } },
+ [STATE_CHARGING_LVL_2] = { { EC_LED_COLOR_AMBER,
+ LED_INDEFINITE } },
+ [STATE_CHARGING_FULL_CHARGE] = { { EC_LED_COLOR_BLUE,
+ LED_INDEFINITE } },
+ [STATE_DISCHARGE_S0] = { { EC_LED_COLOR_BLUE,
+ LED_INDEFINITE } },
+ [STATE_DISCHARGE_S3] = { { EC_LED_COLOR_AMBER,
+ 1 * LED_ONE_SEC },
+ { LED_OFF, 3 * LED_ONE_SEC } },
+ [STATE_DISCHARGE_S5] = { { LED_OFF, LED_INDEFINITE } },
+ [STATE_BATTERY_ERROR] = { { EC_LED_COLOR_AMBER,
+ 1 * LED_ONE_SEC },
+ { LED_OFF, 1 * LED_ONE_SEC } },
+ [STATE_FACTORY_TEST] = { { EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC },
+ { EC_LED_COLOR_AMBER,
+ 2 * LED_ONE_SEC } },
+ };
const enum ec_led_id supported_led_ids[] = {
EC_LED_ID_BATTERY_LED,
@@ -61,9 +68,8 @@ void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range)
{
if (led_id == EC_LED_ID_BATTERY_LED) {
brightness_range[EC_LED_COLOR_AMBER] =
- MT6360_LED_BRIGHTNESS_MAX;
- brightness_range[EC_LED_COLOR_BLUE] =
- MT6360_LED_BRIGHTNESS_MAX;
+ MT6360_LED_BRIGHTNESS_MAX;
+ brightness_range[EC_LED_COLOR_BLUE] = MT6360_LED_BRIGHTNESS_MAX;
}
}