From 6ada099de9c62d6cc290be071fee4529ed86566c Mon Sep 17 00:00:00 2001 From: Diana Z Date: Fri, 16 Apr 2021 15:06:16 -0600 Subject: LED On/Off: Make battery LED optional Currently, all boards using the LED On/Off module have battery LEDs. However, if we'd like to expand support to Chromeboxes then the battery LED must become optional. BRANCH=None BUG=b:185508707 TEST=make -j buildall Signed-off-by: Diana Z Change-Id: Ieae098829ebe6c8b103f23d5abdbf70e7bcbdf2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832692 Reviewed-by: Aseda Aboagye --- board/akemi/led.c | 9 +++++---- board/aleena/led.c | 8 ++++---- board/ampton/led.c | 9 +++++---- board/asurada/led_hayato.c | 9 +++++---- board/blipper/led.c | 9 +++++---- board/bobba/led.c | 9 +++++---- board/boten/led.c | 9 +++++---- board/casta/led.c | 9 +++++---- board/cerise/led.c | 9 +++++---- board/cherry/led.c | 9 +++++---- board/collis/led.c | 9 +++++---- board/copano/led.c | 9 +++++---- board/dalboz/led.c | 9 +++++---- board/damu/led.c | 9 +++++---- board/delbin/led.c | 9 +++++---- board/dood/led.c | 9 +++++---- board/drobit/led.c | 9 +++++---- board/eldrid/led.c | 9 +++++---- board/ezkinil/led.c | 9 +++++---- board/fennel/led.c | 9 +++++---- board/fleex/led.c | 9 +++++---- board/foob/led.c | 9 +++++---- board/galtic/led.c | 9 +++++---- board/garg/led.c | 9 +++++---- board/guybrush/led.c | 9 +++++---- board/halvor/led.c | 9 +++++---- board/hatch/led.c | 9 +++++---- board/helios/led.c | 9 +++++---- board/icarus/led.c | 11 ++++++----- board/jacuzzi/led.c | 11 ++++++----- board/kindred/led.c | 9 +++++---- board/kodama/led.c | 9 +++++---- board/kohaku/led.c | 9 +++++---- board/kracko/led.c | 9 +++++---- board/lalala/led.c | 9 +++++---- board/lick/led.c | 9 +++++---- board/lindar/led.c | 9 +++++---- board/lingcod/led.c | 9 +++++---- board/madoo/led.c | 9 +++++---- board/magolor/led.c | 9 +++++---- board/makomo/led.c | 9 +++++---- board/malefor/led.c | 9 +++++---- board/meep/led.c | 9 +++++---- board/metaknight/led.c | 9 +++++---- board/mushu/led.c | 9 +++++---- board/nightfury/led.c | 9 +++++---- board/nuwani/led.c | 8 ++++---- board/palkia/led.c | 9 +++++---- board/phaser/led.c | 9 +++++---- board/sasuke/led.c | 9 +++++---- board/sasukette/led.c | 9 +++++---- board/shuboz/led.c | 9 +++++---- board/spherion/led.c | 9 +++++---- board/stern/led.c | 9 +++++---- board/storo/led.c | 9 +++++---- board/stryke/led.c | 9 +++++---- board/treeya/led.c | 8 ++++---- board/trembyle/led.c | 9 +++++---- board/vilboz/led.c | 9 +++++---- board/voema/led.c | 9 +++++---- board/voxel/led.c | 9 +++++---- board/willow/led.c | 11 ++++++----- board/woomax/led.c | 9 +++++---- board/yorp/led.c | 9 +++++---- 64 files changed, 320 insertions(+), 259 deletions(-) (limited to 'board') diff --git a/board/akemi/led.c b/board/akemi/led.c index b21fe4d3c0..ef31d2dead 100644 --- a/board/akemi/led.c +++ b/board/akemi/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -58,7 +59,7 @@ __override void led_set_color_power(enum ec_led_colors color) } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/aleena/led.c b/board/aleena/led.c index 430400e6ae..4774a39045 100644 --- a/board/aleena/led.c +++ b/board/aleena/led.c @@ -15,9 +15,9 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* * board_id others 5, 6 @@ -28,7 +28,7 @@ static enum gpio_signal led_amber = GPIO_BAT_LED_1_L; static enum gpio_signal led_blue = GPIO_BAT_LED_2_L; /* Note there is only LED for charge / power */ -struct led_descriptor +__override struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} }, @@ -64,7 +64,7 @@ static void board_led_init(void) } DECLARE_HOOK(HOOK_INIT, board_led_init, HOOK_PRIO_DEFAULT); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_BLUE: diff --git a/board/ampton/led.c b/board/ampton/led.c index 68f9e3eac8..e8c2c35d11 100644 --- a/board/ampton/led.c +++ b/board/ampton/led.c @@ -13,12 +13,13 @@ #define LED_OFF_LVL 0 #define LED_ON_LVL 1 -const int led_charge_lvl_1 = 0; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 94; +__override const int led_charge_lvl_2 = 94; /* Ampton: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/asurada/led_hayato.c b/board/asurada/led_hayato.c index 99ee17bbe6..1d3108c47b 100644 --- a/board/asurada/led_hayato.c +++ b/board/asurada/led_hayato.c @@ -10,10 +10,11 @@ #include "chipset.h" #include "driver/bc12/mt6360.h" -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -46,7 +47,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { mt6360_led_set_brightness(MT6360_LED_RGB2, 50); mt6360_led_set_brightness(MT6360_LED_RGB3, 50); diff --git a/board/blipper/led.c b/board/blipper/led.c index 2b564de8d0..78df105b97 100644 --- a/board/blipper/led.c +++ b/board/blipper/led.c @@ -14,11 +14,12 @@ #define LED_OFF_LVL 0 #define LED_ON_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -36,7 +37,7 @@ const enum ec_led_id supported_led_ids[] = { }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/bobba/led.c b/board/bobba/led.c index 6c5ae18272..d833554ab4 100644 --- a/board/bobba/led.c +++ b/board/bobba/led.c @@ -13,12 +13,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 0; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Bobba: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [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} }, @@ -35,7 +36,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_BLUE: diff --git a/board/boten/led.c b/board/boten/led.c index 2698edba70..93675966b3 100644 --- a/board/boten/led.c +++ b/board/boten/led.c @@ -14,11 +14,12 @@ #define LED_OFF_LVL 0 #define LED_ON_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -56,7 +57,7 @@ __override void led_set_color_power(enum ec_led_colors color) pwm_enable(PWM_CH_LED_WHITE, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/casta/led.c b/board/casta/led.c index bd6e125948..514ec096a5 100644 --- a/board/casta/led.c +++ b/board/casta/led.c @@ -15,12 +15,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 1; +__override const int led_charge_lvl_1 = 1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Casta : There are 3 leds for AC, Battery and Power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, 1 * LED_ONE_SEC}, {LED_OFF, 1 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, @@ -69,7 +70,7 @@ __override void led_set_color_power(enum ec_led_colors color) } } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { /* Don't set led if led_auto_control is disabled. */ if (!led_auto_control_is_enabled(EC_LED_ID_POWER_LED) || diff --git a/board/cerise/led.c b/board/cerise/led.c index c5452209ce..53bec5bf05 100644 --- a/board/cerise/led.c +++ b/board/cerise/led.c @@ -15,10 +15,11 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -39,7 +40,7 @@ const enum ec_led_id supported_led_ids[] = { }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/cherry/led.c b/board/cherry/led.c index 99ee17bbe6..050232478f 100644 --- a/board/cherry/led.c +++ b/board/cherry/led.c @@ -10,10 +10,11 @@ #include "chipset.h" #include "driver/bc12/mt6360.h" -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -46,7 +47,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { mt6360_led_set_brightness(MT6360_LED_RGB2, 50); mt6360_led_set_brightness(MT6360_LED_RGB3, 50); diff --git a/board/collis/led.c b/board/collis/led.c index 328189d807..508a5eb585 100644 --- a/board/collis/led.c +++ b/board/collis/led.c @@ -12,10 +12,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/copano/led.c b/board/copano/led.c index 0dae4498ce..a5b535000a 100644 --- a/board/copano/led.c +++ b/board/copano/led.c @@ -12,10 +12,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/dalboz/led.c b/board/dalboz/led.c index 84630de3ba..53e94e84d6 100644 --- a/board/dalboz/led.c +++ b/board/dalboz/led.c @@ -11,10 +11,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_1; +__override const int led_charge_lvl_2 = 100; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_GREEN, 2 * LED_ONE_SEC}, {EC_LED_COLOR_RED, 2 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, @@ -57,7 +58,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_LED3_PWM, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_GREEN: diff --git a/board/damu/led.c b/board/damu/led.c index 7e9be12e2a..ee376b4b41 100644 --- a/board/damu/led.c +++ b/board/damu/led.c @@ -14,10 +14,11 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -46,7 +47,7 @@ const enum ec_led_id supported_led_ids[] = { }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/delbin/led.c b/board/delbin/led.c index 7793e73271..27f63c9544 100644 --- a/board/delbin/led.c +++ b/board/delbin/led.c @@ -12,11 +12,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -47,7 +48,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/dood/led.c b/board/dood/led.c index c31b2d5316..966f3d7a72 100644 --- a/board/dood/led.c +++ b/board/dood/led.c @@ -13,12 +13,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Dood: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_WHITE, LED_INDEFINITE} }, [STATE_DISCHARGE_S0] = {{EC_LED_COLOR_WHITE, LED_INDEFINITE} }, @@ -35,7 +36,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/drobit/led.c b/board/drobit/led.c index b9178670d3..47c3cca5b7 100644 --- a/board/drobit/led.c +++ b/board/drobit/led.c @@ -12,10 +12,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/eldrid/led.c b/board/eldrid/led.c index 570bcaab01..3cbf06c123 100644 --- a/board/eldrid/led.c +++ b/board/eldrid/led.c @@ -22,11 +22,12 @@ #define LED_SIDESEL_MB_PORT 0 #define LED_SIDESEL_DB_PORT 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -64,7 +65,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { int port; int side_select_duty; diff --git a/board/ezkinil/led.c b/board/ezkinil/led.c index a4eb63b13f..7c425fa138 100644 --- a/board/ezkinil/led.c +++ b/board/ezkinil/led.c @@ -11,10 +11,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_1; +__override const int led_charge_lvl_2 = 100; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC}, {EC_LED_COLOR_AMBER, 2 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, @@ -33,7 +34,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_BLUE: diff --git a/board/fennel/led.c b/board/fennel/led.c index 96ad9361f9..7d95c4807e 100644 --- a/board/fennel/led.c +++ b/board/fennel/led.c @@ -14,10 +14,11 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -46,7 +47,7 @@ const enum ec_led_id supported_led_ids[] = { }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_GREEN: diff --git a/board/fleex/led.c b/board/fleex/led.c index d502c16797..4d89f657cd 100644 --- a/board/fleex/led.c +++ b/board/fleex/led.c @@ -13,12 +13,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 10; +__override const int led_charge_lvl_1 = 10; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Fleex: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC}, {LED_OFF, 1 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, @@ -41,7 +42,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/foob/led.c b/board/foob/led.c index c2c2957518..c08203ccda 100644 --- a/board/foob/led.c +++ b/board/foob/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -56,7 +57,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_PWR_LED_WHITE_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/galtic/led.c b/board/galtic/led.c index 3bdff605db..ecd40dc973 100644 --- a/board/galtic/led.c +++ b/board/galtic/led.c @@ -12,10 +12,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/garg/led.c b/board/garg/led.c index f533ed32b6..6e0306edd9 100644 --- a/board/garg/led.c +++ b/board/garg/led.c @@ -13,12 +13,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Garg: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [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} }, @@ -35,7 +36,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_BLUE: diff --git a/board/guybrush/led.c b/board/guybrush/led.c index d82070cdaa..b17c8be488 100644 --- a/board/guybrush/led.c +++ b/board/guybrush/led.c @@ -17,11 +17,12 @@ #define CPRINTS(format, args...) cprints(CC_PWM, format, ## args) -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -41,7 +42,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/halvor/led.c b/board/halvor/led.c index b648937d3e..1e25e3e666 100644 --- a/board/halvor/led.c +++ b/board/halvor/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 1 #define LED_OFF_LVL 0 -const int led_charge_lvl_1 = 10; +__override const int led_charge_lvl_1 = 10; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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] = {{LED_OFF, LED_INDEFINITE} }, @@ -50,7 +51,7 @@ const enum ec_led_id supported_led_ids[] = { }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { gpio_set_level(GPIO_LED_2_L, (color == EC_LED_COLOR_AMBER) ? LED_ON_LVL : LED_OFF_LVL); diff --git a/board/hatch/led.c b/board/hatch/led.c index d6da1d098f..1c44d12d89 100644 --- a/board/hatch/led.c +++ b/board/hatch/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/helios/led.c b/board/helios/led.c index b4a89f9a08..94f5bdb973 100644 --- a/board/helios/led.c +++ b/board/helios/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -49,7 +50,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/icarus/led.c b/board/icarus/led.c index 0f5cd07849..076199b2ed 100644 --- a/board/icarus/led.c +++ b/board/icarus/led.c @@ -11,9 +11,10 @@ #include "led_onoff_states.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -30,7 +31,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: @@ -76,4 +77,4 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) led_set_color_battery(LED_OFF); } return EC_SUCCESS; -} \ No newline at end of file +} diff --git a/board/jacuzzi/led.c b/board/jacuzzi/led.c index d0039cbfae..e76b73bc9a 100644 --- a/board/jacuzzi/led.c +++ b/board/jacuzzi/led.c @@ -12,9 +12,10 @@ #include "led_onoff_states.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -31,7 +32,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: @@ -77,4 +78,4 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) led_set_color_battery(LED_OFF); } return EC_SUCCESS; -} \ No newline at end of file +} diff --git a/board/kindred/led.c b/board/kindred/led.c index f47ee7e101..9eb195d0b6 100644 --- a/board/kindred/led.c +++ b/board/kindred/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -38,7 +39,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/kodama/led.c b/board/kodama/led.c index 0b67553a7b..d96b340d73 100644 --- a/board/kodama/led.c +++ b/board/kodama/led.c @@ -20,10 +20,11 @@ #define LED_MASK_GREEN MT6370_MASK_RGB_ISNK2DIM_EN #define LED_MASK_WHITE MT6370_MASK_RGB_ISNK3DIM_EN -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -75,7 +76,7 @@ __override void led_set_color_power(enum ec_led_colors color) led_set_color(led_mask); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/kohaku/led.c b/board/kohaku/led.c index 7effe1b2bf..029cf5c315 100644 --- a/board/kohaku/led.c +++ b/board/kohaku/led.c @@ -15,12 +15,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 0; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Kohaku : There are 3 leds for AC, Battery and Power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -68,7 +69,7 @@ __override void led_set_color_power(enum ec_led_colors color) } } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { /* Don't set led if led_auto_control is disabled. */ if (!led_auto_control_is_enabled(EC_LED_ID_POWER_LED) || diff --git a/board/kracko/led.c b/board/kracko/led.c index 96f7ba21a5..af78cfa883 100644 --- a/board/kracko/led.c +++ b/board/kracko/led.c @@ -13,12 +13,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Kracko: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [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} }, @@ -35,7 +36,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_BLUE: diff --git a/board/lalala/led.c b/board/lalala/led.c index 6f8d8d4890..cfe6f9eb6a 100644 --- a/board/lalala/led.c +++ b/board/lalala/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -38,7 +39,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/lick/led.c b/board/lick/led.c index 862eba52cb..a55a3e989e 100644 --- a/board/lick/led.c +++ b/board/lick/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -56,7 +57,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_PWR_LED_WHITE_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/lindar/led.c b/board/lindar/led.c index db685faede..6d602d5c4e 100644 --- a/board/lindar/led.c +++ b/board/lindar/led.c @@ -29,11 +29,12 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -72,7 +73,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_LED_3_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/lingcod/led.c b/board/lingcod/led.c index 770348e1fe..0f7d37723b 100644 --- a/board/lingcod/led.c +++ b/board/lingcod/led.c @@ -13,11 +13,12 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -55,7 +56,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_LED_3_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/madoo/led.c b/board/madoo/led.c index 58387fea26..d6bed74e4b 100644 --- a/board/madoo/led.c +++ b/board/madoo/led.c @@ -17,12 +17,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* madoo: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -101,7 +102,7 @@ int battery_safety_check(void) return false; } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/magolor/led.c b/board/magolor/led.c index e682e5fd48..5206244073 100644 --- a/board/magolor/led.c +++ b/board/magolor/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -38,7 +39,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/makomo/led.c b/board/makomo/led.c index 3b865949a8..140c31babe 100644 --- a/board/makomo/led.c +++ b/board/makomo/led.c @@ -14,10 +14,11 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -46,7 +47,7 @@ const enum ec_led_id supported_led_ids[] = { }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_GREEN: diff --git a/board/malefor/led.c b/board/malefor/led.c index 770348e1fe..0f7d37723b 100644 --- a/board/malefor/led.c +++ b/board/malefor/led.c @@ -13,11 +13,12 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -55,7 +56,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_LED_3_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/meep/led.c b/board/meep/led.c index e05feed42f..5494f11361 100644 --- a/board/meep/led.c +++ b/board/meep/led.c @@ -14,12 +14,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Meep: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -77,7 +78,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_PWR_LED_WHITE_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/metaknight/led.c b/board/metaknight/led.c index ca8ac8ede7..10edf9068e 100644 --- a/board/metaknight/led.c +++ b/board/metaknight/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -38,7 +39,7 @@ const enum ec_led_id supported_led_ids[] = { }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/mushu/led.c b/board/mushu/led.c index 4e0c721c1b..18600ee245 100644 --- a/board/mushu/led.c +++ b/board/mushu/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/nightfury/led.c b/board/nightfury/led.c index a70730a098..dce39acfd6 100644 --- a/board/nightfury/led.c +++ b/board/nightfury/led.c @@ -15,12 +15,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 1; +__override const int led_charge_lvl_1 = 1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Nightfury : There are 3 leds for AC, Battery and Power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, 0.5 * LED_ONE_SEC}, {LED_OFF, 0.5 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, @@ -69,7 +70,7 @@ __override void led_set_color_power(enum ec_led_colors color) } } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { /* Don't set led if led_auto_control is disabled. */ if (!led_auto_control_is_enabled(EC_LED_ID_POWER_LED) || diff --git a/board/nuwani/led.c b/board/nuwani/led.c index 634632751f..76156d66d4 100644 --- a/board/nuwani/led.c +++ b/board/nuwani/led.c @@ -11,11 +11,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor +__override struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, @@ -54,7 +54,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_POWER_LED_3_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/palkia/led.c b/board/palkia/led.c index 551dd0dbf0..c7607960e5 100644 --- a/board/palkia/led.c +++ b/board/palkia/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -49,7 +50,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/phaser/led.c b/board/phaser/led.c index 0ad9b90f05..6ef2d786c0 100644 --- a/board/phaser/led.c +++ b/board/phaser/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -56,7 +57,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_PWR_LED_WHITE_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/sasuke/led.c b/board/sasuke/led.c index e3fe3d2ec6..67d0889831 100644 --- a/board/sasuke/led.c +++ b/board/sasuke/led.c @@ -15,12 +15,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 1; +__override const int led_charge_lvl_1 = 1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* sasuke : There are 3 leds for AC, Battery and Power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, 1 * LED_ONE_SEC}, {LED_OFF, 1 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, @@ -69,7 +70,7 @@ __override void led_set_color_power(enum ec_led_colors color) } } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { /* Don't set led if led_auto_control is disabled. */ if (!led_auto_control_is_enabled(EC_LED_ID_POWER_LED) || diff --git a/board/sasukette/led.c b/board/sasukette/led.c index 11b734b995..28643a7b87 100644 --- a/board/sasukette/led.c +++ b/board/sasukette/led.c @@ -16,12 +16,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 1; +__override const int led_charge_lvl_1 = 1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Sasukette : There are 3 leds for AC, Battery and Power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, 1 * LED_ONE_SEC}, {LED_OFF, 1 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, @@ -69,7 +70,7 @@ __override void led_set_color_power(enum ec_led_colors color) } } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { /* Don't set led if led_auto_control is disabled. */ if (!led_auto_control_is_enabled(EC_LED_ID_POWER_LED) || diff --git a/board/shuboz/led.c b/board/shuboz/led.c index 7d3bec754a..af91f32ec6 100644 --- a/board/shuboz/led.c +++ b/board/shuboz/led.c @@ -12,10 +12,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -39,7 +40,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/spherion/led.c b/board/spherion/led.c index 1c4d62730f..aad85d02c1 100644 --- a/board/spherion/led.c +++ b/board/spherion/led.c @@ -12,10 +12,11 @@ #include "chipset.h" #include "driver/bc12/mt6360.h" -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -35,7 +36,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { mt6360_led_set_brightness(MT6360_LED_RGB1, 50); mt6360_led_set_brightness(MT6360_LED_RGB3, 50); diff --git a/board/stern/led.c b/board/stern/led.c index f6205046b6..ac4813c8c0 100644 --- a/board/stern/led.c +++ b/board/stern/led.c @@ -14,10 +14,11 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -45,7 +46,7 @@ const enum ec_led_id supported_led_ids[] = { }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/storo/led.c b/board/storo/led.c index 27f8dfe1ac..d5094f1f30 100644 --- a/board/storo/led.c +++ b/board/storo/led.c @@ -13,10 +13,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -38,7 +39,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_WHITE: diff --git a/board/stryke/led.c b/board/stryke/led.c index b9ee4a9442..f68b39361e 100644 --- a/board/stryke/led.c +++ b/board/stryke/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/treeya/led.c b/board/treeya/led.c index d5d0b790be..9647b45e74 100644 --- a/board/treeya/led.c +++ b/board/treeya/led.c @@ -11,11 +11,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor +__override struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, @@ -54,7 +54,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_POWER_LED_3_L, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_RED: diff --git a/board/trembyle/led.c b/board/trembyle/led.c index ea8e445166..3e2d195a06 100644 --- a/board/trembyle/led.c +++ b/board/trembyle/led.c @@ -11,10 +11,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_1; +__override const int led_charge_lvl_2 = 100; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC}, {EC_LED_COLOR_RED, 2 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, @@ -33,7 +34,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_BLUE: diff --git a/board/vilboz/led.c b/board/vilboz/led.c index 4d06dc0e34..4e9697ddbb 100644 --- a/board/vilboz/led.c +++ b/board/vilboz/led.c @@ -11,10 +11,11 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 97; +__override const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_2 = 97; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_RED, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} }, @@ -57,7 +58,7 @@ __override void led_set_color_power(enum ec_led_colors color) gpio_set_level(GPIO_LED3_PWM, LED_OFF_LVL); } -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_GREEN: diff --git a/board/voema/led.c b/board/voema/led.c index 65e9018b20..25e71c262d 100644 --- a/board/voema/led.c +++ b/board/voema/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -38,7 +39,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/voxel/led.c b/board/voxel/led.c index 8ad3e9c1f8..4be69689f7 100644 --- a/board/voxel/led.c +++ b/board/voxel/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -38,7 +39,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/willow/led.c b/board/willow/led.c index e5b204f934..c579cb6165 100644 --- a/board/willow/led.c +++ b/board/willow/led.c @@ -12,9 +12,10 @@ #include "led_onoff_states.h" #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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} }, @@ -31,7 +32,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: @@ -77,4 +78,4 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) led_set_color_battery(LED_OFF); } return EC_SUCCESS; -} \ No newline at end of file +} diff --git a/board/woomax/led.c b/board/woomax/led.c index f7d4f4daae..e1091c92f3 100644 --- a/board/woomax/led.c +++ b/board/woomax/led.c @@ -12,11 +12,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__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_WHITE, LED_INDEFINITE} }, @@ -47,7 +48,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: diff --git a/board/yorp/led.c b/board/yorp/led.c index e5dd48327b..888b74fa12 100644 --- a/board/yorp/led.c +++ b/board/yorp/led.c @@ -13,12 +13,13 @@ #define LED_OFF_LVL 1 #define LED_ON_LVL 0 -const int led_charge_lvl_1 = 0; +__override const int led_charge_lvl_1; -const int led_charge_lvl_2 = 100; +__override const int led_charge_lvl_2 = 100; /* Yorp: Note there is only LED for charge / power */ -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC}, {EC_LED_COLOR_AMBER, 2 * LED_ONE_SEC} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_BLUE: -- cgit v1.2.1