diff options
-rw-r--r-- | board/kindred/gpio.inc | 4 | ||||
-rw-r--r-- | board/kindred/led.c | 25 |
2 files changed, 15 insertions, 14 deletions
diff --git a/board/kindred/gpio.inc b/board/kindred/gpio.inc index cac7cde055..2564c76888 100644 --- a/board/kindred/gpio.inc +++ b/board/kindred/gpio.inc @@ -67,8 +67,8 @@ GPIO(EN_USB_A_LOW_PWR_OD, PIN(9, 4), GPIO_OUT_LOW) /* Misc Signals */ GPIO(EC_BATT_PRES_ODL, PIN(E, 1), GPIO_INPUT) -GPIO(LED_1_L, PIN(C, 4), GPIO_OUT_HIGH) /* Yellow (hatch) */ -GPIO(LED_2_L, PIN(C, 3), GPIO_OUT_HIGH) /* White (hatch) */ +GPIO(LED_1_L, PIN(C, 4), GPIO_OUT_HIGH) /* Blue (kindred) */ +GPIO(LED_2_L, PIN(C, 3), GPIO_OUT_HIGH) /* Yellow (kindred) */ GPIO(LED_3_L, PIN(C, 2), GPIO_OUT_HIGH) GPIO(LED_4_L, PIN(6, 0), GPIO_OUT_HIGH) GPIO(EC_KB_BL_EN, PIN(8, 6), GPIO_OUT_LOW) /* Keyboard backlight */ diff --git a/board/kindred/led.c b/board/kindred/led.c index d6da1d098f..f47ee7e101 100644 --- a/board/kindred/led.c +++ b/board/kindred/led.c @@ -21,13 +21,14 @@ const int led_charge_lvl_2 = 95; 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} }, - [STATE_DISCHARGE_S0] = {{LED_OFF, LED_INDEFINITE} }, - [STATE_DISCHARGE_S3] = {{LED_OFF, 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_WHITE, 2 * LED_ONE_SEC}, + [STATE_FACTORY_TEST] = {{EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC}, {EC_LED_COLOR_AMBER, 2 * LED_ONE_SEC} }, }; @@ -41,12 +42,12 @@ void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: - gpio_set_level(GPIO_LED_2_L, LED_OFF_LVL); - gpio_set_level(GPIO_LED_1_L, LED_ON_LVL); - break; - case EC_LED_COLOR_WHITE: - gpio_set_level(GPIO_LED_1_L, LED_OFF_LVL); gpio_set_level(GPIO_LED_2_L, LED_ON_LVL); + gpio_set_level(GPIO_LED_1_L, LED_OFF_LVL); + break; + case EC_LED_COLOR_BLUE: + gpio_set_level(GPIO_LED_1_L, LED_ON_LVL); + gpio_set_level(GPIO_LED_2_L, LED_OFF_LVL); break; default: /* LED_OFF and other unsupported colors */ gpio_set_level(GPIO_LED_1_L, LED_OFF_LVL); @@ -59,7 +60,7 @@ 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] = 1; - brightness_range[EC_LED_COLOR_WHITE] = 1; + brightness_range[EC_LED_COLOR_BLUE] = 1; } } @@ -68,8 +69,8 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) if (led_id == EC_LED_ID_BATTERY_LED) { if (brightness[EC_LED_COLOR_AMBER] != 0) led_set_color_battery(EC_LED_COLOR_AMBER); - else if (brightness[EC_LED_COLOR_WHITE] != 0) - led_set_color_battery(EC_LED_COLOR_WHITE); + else if (brightness[EC_LED_COLOR_BLUE] != 0) + led_set_color_battery(EC_LED_COLOR_BLUE); else led_set_color_battery(LED_OFF); } |