summaryrefslogtreecommitdiff
path: root/board/dalboz
diff options
context:
space:
mode:
Diffstat (limited to 'board/dalboz')
-rw-r--r--board/dalboz/battery.c2
-rw-r--r--board/dalboz/board.c105
-rw-r--r--board/dalboz/board.h93
-rw-r--r--board/dalboz/build.mk2
-rw-r--r--board/dalboz/ec.tasklist2
-rw-r--r--board/dalboz/gpio.inc2
-rw-r--r--board/dalboz/led.c61
7 files changed, 124 insertions, 143 deletions
diff --git a/board/dalboz/battery.c b/board/dalboz/battery.c
index 5a90a767c8..e5adf3c4b3 100644
--- a/board/dalboz/battery.c
+++ b/board/dalboz/battery.c
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
diff --git a/board/dalboz/board.c b/board/dalboz/board.c
index e8690d5cc1..471446878f 100644
--- a/board/dalboz/board.c
+++ b/board/dalboz/board.c
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -10,7 +10,7 @@
#include "driver/accelgyro_lsm6dsm.h"
#include "driver/bc12/pi3usb9201.h"
#include "driver/ioexpander/pcal6408.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/retimer/pi3hdx1204.h"
#include "driver/tcpm/nct38xx.h"
@@ -36,8 +36,8 @@
#include "usb_pd_tcpm.h"
#include "usbc_ppc.h"
-#define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ## args)
-#define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ## args)
+#define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args)
+#define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ##args)
/* This I2C moved. Temporarily detect and support the V0 HW. */
int I2C_PORT_BATTERY = I2C_PORT_BATTERY_V1;
@@ -84,11 +84,9 @@ static struct stprivate_data g_lis2dwl_data;
static struct lsm6dsm_data g_lsm6dsm_data = LSM6DSM_DATA;
/* Matrix to rotate accelrator into standard reference frame */
-static const mat33_fp_t base_standard_ref = {
- { FLOAT_TO_FP(-1), 0, 0},
- { 0, FLOAT_TO_FP(-1), 0},
- { 0, 0, FLOAT_TO_FP(1)}
-};
+static const mat33_fp_t base_standard_ref = { { FLOAT_TO_FP(-1), 0, 0 },
+ { 0, FLOAT_TO_FP(-1), 0 },
+ { 0, 0, FLOAT_TO_FP(1) } };
/* TODO(gcc >= 5.0) Remove the casts to const pointer at rot_standard_ref */
struct motion_sensor_t motion_sensors[] = {
@@ -203,9 +201,7 @@ static void board_chipset_resume(void)
if (ec_config_has_hdmi_retimer_pi3hdx1204()) {
ioex_set_level(IOEX_EN_PWR_HDMI_DB, 1);
msleep(PI3HDX1204_POWER_ON_DELAY_MS);
- pi3hdx1204_enable(I2C_PORT_TCPC1,
- PI3HDX1204_I2C_ADDR_FLAGS,
- 1);
+ pi3hdx1204_enable(I2C_PORT_TCPC1, PI3HDX1204_I2C_ADDR_FLAGS, 1);
}
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
@@ -215,16 +211,13 @@ static void board_chipset_suspend(void)
ioex_set_level(IOEX_USB_A1_RETIMER_EN, 0);
if (ec_config_has_hdmi_retimer_pi3hdx1204()) {
- pi3hdx1204_enable(I2C_PORT_TCPC1,
- PI3HDX1204_I2C_ADDR_FLAGS,
- 0);
+ pi3hdx1204_enable(I2C_PORT_TCPC1, PI3HDX1204_I2C_ADDR_FLAGS, 0);
ioex_set_level(IOEX_EN_PWR_HDMI_DB, 0);
}
}
DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
-static int board_ps8743_mux_set(const struct usb_mux *me,
- mux_state_t mux_state)
+static int board_ps8743_mux_set(const struct usb_mux *me, mux_state_t mux_state)
{
if (mux_state & USB_PD_MUX_DP_ENABLED)
/* Enable IN_HPD on the DB */
@@ -236,7 +229,6 @@ static int board_ps8743_mux_set(const struct usb_mux *me,
return EC_SUCCESS;
}
-
/*****************************************************************************
* USB-C
*/
@@ -274,33 +266,45 @@ const struct usb_mux_driver usbc0_sbu_mux_driver = {
* Since FSUSB42UMX is not a i2c device, .i2c_port and
* .i2c_addr_flags are not required here.
*/
-const struct usb_mux usbc0_sbu_mux = {
- .usb_port = USBC_PORT_C0,
- .driver = &usbc0_sbu_mux_driver,
+const struct usb_mux_chain usbc0_sbu_mux = {
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = USBC_PORT_C0,
+ .driver = &usbc0_sbu_mux_driver,
+ },
};
-struct usb_mux usbc1_amd_fp5_usb_mux = {
+struct usb_mux usbc1_ps8xxx_mux = {
.usb_port = USBC_PORT_C1,
- .i2c_port = I2C_PORT_USB_AP_MUX,
- .i2c_addr_flags = AMD_FP5_MUX_I2C_ADDR_FLAGS,
- .driver = &amd_fp5_usb_mux_driver,
- .flags = USB_MUX_FLAG_SET_WITHOUT_FLIP,
+ .i2c_port = I2C_PORT_TCPC1,
+ .i2c_addr_flags = PS8743_I2C_ADDR1_FLAG,
+ .driver = &ps8743_usb_mux_driver,
+};
+
+struct usb_mux_chain usbc1_amd_fp5_usb_mux = {
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = USBC_PORT_C1,
+ .i2c_port = I2C_PORT_USB_AP_MUX,
+ .i2c_addr_flags = AMD_FP5_MUX_I2C_ADDR_FLAGS,
+ .driver = &amd_fp5_usb_mux_driver,
+ .flags = USB_MUX_FLAG_SET_WITHOUT_FLIP,
+ },
};
-struct usb_mux usb_muxes[] = {
+struct usb_mux_chain usb_muxes[] = {
[USBC_PORT_C0] = {
- .usb_port = USBC_PORT_C0,
- .i2c_port = I2C_PORT_USB_AP_MUX,
- .i2c_addr_flags = AMD_FP5_MUX_I2C_ADDR_FLAGS,
- .driver = &amd_fp5_usb_mux_driver,
- .next_mux = &usbc0_sbu_mux,
+ .mux = &(const struct usb_mux) {
+ .usb_port = USBC_PORT_C0,
+ .i2c_port = I2C_PORT_USB_AP_MUX,
+ .i2c_addr_flags = AMD_FP5_MUX_I2C_ADDR_FLAGS,
+ .driver = &amd_fp5_usb_mux_driver,
+ },
+ .next = &usbc0_sbu_mux,
},
[USBC_PORT_C1] = {
- .usb_port = USBC_PORT_C1,
- .i2c_port = I2C_PORT_TCPC1,
- .i2c_addr_flags = PS8743_I2C_ADDR1_FLAG,
- .driver = &ps8743_usb_mux_driver,
- .next_mux = &usbc1_amd_fp5_usb_mux,
+ .mux = &usbc1_ps8xxx_mux,
+ .next = &usbc1_amd_fp5_usb_mux,
}
};
BUILD_ASSERT(ARRAY_SIZE(usb_muxes) == USBC_PORT_COUNT);
@@ -343,8 +347,7 @@ void ppc_interrupt(enum gpio_signal signal)
int board_set_active_charge_port(int port)
{
- int is_valid_port = (port >= 0 &&
- port < CONFIG_USB_PD_PORT_MAX_COUNT);
+ int is_valid_port = (port >= 0 && port < CONFIG_USB_PD_PORT_MAX_COUNT);
int i;
if (port == CHARGE_PORT_NONE) {
@@ -365,7 +368,6 @@ int board_set_active_charge_port(int port)
return EC_ERROR_INVAL;
}
-
/* Check if the port is sourcing VBUS. */
if (ppc_is_sourcing_vbus(port)) {
CPRINTFUSB("Skip enable C%d", port);
@@ -467,7 +469,6 @@ static void reset_nct38xx_port(int port)
msleep(NCT3807_RESET_POST_DELAY_MS);
}
-
void board_reset_pd_mcu(void)
{
/* Reset TCPC0 */
@@ -538,11 +539,9 @@ int board_pd_set_frs_enable(int port, int enable)
/* Use the TCPC to enable fast switch when FRS included */
if (port == USBC_PORT_C0) {
- rv = ioex_set_level(IOEX_USB_C0_TCPC_FASTSW_CTL_EN,
- !!enable);
+ rv = ioex_set_level(IOEX_USB_C0_TCPC_FASTSW_CTL_EN, !!enable);
} else {
- rv = ioex_set_level(IOEX_USB_C1_TCPC_FASTSW_CTL_EN,
- !!enable);
+ rv = ioex_set_level(IOEX_USB_C1_TCPC_FASTSW_CTL_EN, !!enable);
}
return rv;
@@ -552,17 +551,17 @@ static void setup_fw_config(void)
{
uint32_t board_version = 0;
- if (cbi_get_board_version(&board_version) == EC_SUCCESS
- && board_version >= 2) {
+ if (cbi_get_board_version(&board_version) == EC_SUCCESS &&
+ board_version >= 2) {
ccprints("PS8743 USB MUX");
- usb_muxes[USBC_PORT_C1].i2c_addr_flags = PS8743_I2C_ADDR1_FLAG;
- usb_muxes[USBC_PORT_C1].driver = &ps8743_usb_mux_driver;
- usb_muxes[USBC_PORT_C1].board_set = &board_ps8743_mux_set;
+ usbc1_ps8xxx_mux.i2c_addr_flags = PS8743_I2C_ADDR1_FLAG;
+ usbc1_ps8xxx_mux.driver = &ps8743_usb_mux_driver;
+ usbc1_ps8xxx_mux.board_set = &board_ps8743_mux_set;
} else {
ccprints("PS8740 USB MUX");
- usb_muxes[USBC_PORT_C1].i2c_addr_flags = PS8740_I2C_ADDR0_FLAG;
- usb_muxes[USBC_PORT_C1].driver = &ps8740_usb_mux_driver;
- usb_muxes[USBC_PORT_C1].board_set = NULL;
+ usbc1_ps8xxx_mux.i2c_addr_flags = PS8740_I2C_ADDR0_FLAG;
+ usbc1_ps8xxx_mux.driver = &ps8740_usb_mux_driver;
+ usbc1_ps8xxx_mux.board_set = NULL;
}
if (ec_config_get_usb_db() == DALBOZ_DB_D_OPT2_USBA_HDMI) {
diff --git a/board/dalboz/board.h b/board/dalboz/board.h
index bcb60bda0b..967d1dce8f 100644
--- a/board/dalboz/board.h
+++ b/board/dalboz/board.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -40,42 +40,36 @@
#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL
-
-
/* GPIO mapping from board specific name to EC common name. */
-#define CONFIG_BATTERY_PRESENT_GPIO GPIO_EC_BATT_PRES_ODL
-#define CONFIG_SCI_GPIO GPIO_EC_FCH_SCI_ODL
-#define GPIO_AC_PRESENT GPIO_ACOK_OD
-#define GPIO_CPU_PROCHOT GPIO_PROCHOT_ODL
-#define GPIO_EC_INT_L GPIO_EC_AP_INT_ODL
-#define GPIO_ENABLE_BACKLIGHT_L GPIO_EC_EDP_BL_DISABLE
-#define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW
-#define GPIO_KBD_KSO2 GPIO_EC_KSO_02_INV
-#define GPIO_PCH_PWRBTN_L GPIO_EC_FCH_PWR_BTN_L
-#define GPIO_PCH_RSMRST_L GPIO_EC_FCH_RSMRST_L
-#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L
-#define GPIO_PCH_SLP_S5_L GPIO_SLP_S5_L
-#define GPIO_PCH_SYS_PWROK GPIO_EC_FCH_PWROK
-#define GPIO_PCH_WAKE_L GPIO_EC_FCH_WAKE_L
-#define GPIO_POWER_BUTTON_L GPIO_EC_PWR_BTN_ODL
-#define GPIO_S0_PGOOD GPIO_S0_PWROK_OD
-#define GPIO_S5_PGOOD GPIO_EC_PWROK_OD
-#define GPIO_SYS_RESET_L GPIO_EC_SYS_RST_L
-#define GPIO_VOLUME_DOWN_L GPIO_VOLDN_BTN_ODL
-#define GPIO_VOLUME_UP_L GPIO_VOLUP_BTN_ODL
-#define GPIO_WP_L GPIO_EC_WP_L
-#define GPIO_PACKET_MODE_EN GPIO_EC_H1_PACKET_MODE
+#define CONFIG_BATTERY_PRESENT_GPIO GPIO_EC_BATT_PRES_ODL
+#define CONFIG_SCI_GPIO GPIO_EC_FCH_SCI_ODL
+#define GPIO_AC_PRESENT GPIO_ACOK_OD
+#define GPIO_CPU_PROCHOT GPIO_PROCHOT_ODL
+#define GPIO_EC_INT_L GPIO_EC_AP_INT_ODL
+#define GPIO_ENABLE_BACKLIGHT_L GPIO_EC_EDP_BL_DISABLE
+#define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW
+#define GPIO_KBD_KSO2 GPIO_EC_KSO_02_INV
+#define GPIO_PCH_PWRBTN_L GPIO_EC_FCH_PWR_BTN_L
+#define GPIO_PCH_RSMRST_L GPIO_EC_FCH_RSMRST_L
+#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L
+#define GPIO_PCH_SLP_S5_L GPIO_SLP_S5_L
+#define GPIO_PCH_SYS_PWROK GPIO_EC_FCH_PWROK
+#define GPIO_PCH_WAKE_L GPIO_EC_FCH_WAKE_L
+#define GPIO_POWER_BUTTON_L GPIO_EC_PWR_BTN_ODL
+#define GPIO_S0_PGOOD GPIO_S0_PWROK_OD
+#define GPIO_S5_PGOOD GPIO_EC_PWROK_OD
+#define GPIO_SYS_RESET_L GPIO_EC_SYS_RST_L
+#define GPIO_VOLUME_DOWN_L GPIO_VOLDN_BTN_ODL
+#define GPIO_VOLUME_UP_L GPIO_VOLUP_BTN_ODL
+#define GPIO_WP_L GPIO_EC_WP_L
+#define GPIO_PACKET_MODE_EN GPIO_EC_H1_PACKET_MODE
#ifndef __ASSEMBLER__
/* This I2C moved. Temporarily detect and support the V0 HW. */
extern int I2C_PORT_BATTERY;
-enum adc_channel {
- ADC_TEMP_SENSOR_CHARGER,
- ADC_TEMP_SENSOR_SOC,
- ADC_CH_COUNT
-};
+enum adc_channel { ADC_TEMP_SENSOR_CHARGER, ADC_TEMP_SENSOR_SOC, ADC_CH_COUNT };
enum battery_type {
BATTERY_SMP,
@@ -84,10 +78,7 @@ enum battery_type {
BATTERY_TYPE_COUNT,
};
-enum pwm_channel {
- PWM_CH_KBLIGHT = 0,
- PWM_CH_COUNT
-};
+enum pwm_channel { PWM_CH_KBLIGHT = 0, PWM_CH_COUNT };
enum ioex_port {
IOEX_C0_NCT3807 = 0,
@@ -96,9 +87,7 @@ enum ioex_port {
IOEX_PORT_COUNT
};
-#define PORT_TO_HPD(port) ((port == 0) \
- ? GPIO_USB3_C0_DP2_HPD \
- : GPIO_DP1_HPD)
+#define PORT_TO_HPD(port) ((port == 0) ? GPIO_USB3_C0_DP2_HPD : GPIO_DP1_HPD)
enum temp_sensor_id {
TEMP_SENSOR_CHARGER = 0,
@@ -107,17 +96,9 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT
};
-enum usba_port {
- USBA_PORT_A0 = 0,
- USBA_PORT_A1,
- USBA_PORT_COUNT
-};
+enum usba_port { USBA_PORT_A0 = 0, USBA_PORT_A1, USBA_PORT_COUNT };
-enum usbc_port {
- USBC_PORT_C0 = 0,
- USBC_PORT_C1,
- USBC_PORT_COUNT
-};
+enum usbc_port { USBC_PORT_C0 = 0, USBC_PORT_C1, USBC_PORT_COUNT };
/*****************************************************************************
* CBI EC FW Configuration
@@ -166,31 +147,25 @@ enum ec_cfg_usb_db_type {
#include "cbi_ec_fw_config.h"
-#define HAS_USBC1 \
- (BIT(DALBOZ_DB_D_OPT1_USBAC))
+#define HAS_USBC1 (BIT(DALBOZ_DB_D_OPT1_USBAC))
static inline bool ec_config_has_usbc1(void)
{
- return !!(BIT(ec_config_get_usb_db()) &
- HAS_USBC1);
+ return !!(BIT(ec_config_get_usb_db()) & HAS_USBC1);
}
-#define HAS_USBC1_RETIMER_PS8740 \
- (BIT(DALBOZ_DB_D_OPT1_USBAC))
+#define HAS_USBC1_RETIMER_PS8740 (BIT(DALBOZ_DB_D_OPT1_USBAC))
static inline bool ec_config_has_usbc1_retimer_ps8740(void)
{
- return !!(BIT(ec_config_get_usb_db()) &
- HAS_USBC1_RETIMER_PS8740);
+ return !!(BIT(ec_config_get_usb_db()) & HAS_USBC1_RETIMER_PS8740);
}
-#define HAS_HDMI_RETIMER_PI3HDX1204 \
- (BIT(DALBOZ_DB_D_OPT2_USBA_HDMI))
+#define HAS_HDMI_RETIMER_PI3HDX1204 (BIT(DALBOZ_DB_D_OPT2_USBA_HDMI))
static inline bool ec_config_has_hdmi_retimer_pi3hdx1204(void)
{
- return !!(BIT(ec_config_get_usb_db()) &
- HAS_HDMI_RETIMER_PI3HDX1204);
+ return !!(BIT(ec_config_get_usb_db()) & HAS_HDMI_RETIMER_PI3HDX1204);
}
/* These IO expander GPIOs vary with DB option. */
diff --git a/board/dalboz/build.mk b/board/dalboz/build.mk
index 4ca0cbd96f..cd58c2b91b 100644
--- a/board/dalboz/build.mk
+++ b/board/dalboz/build.mk
@@ -1,5 +1,5 @@
# -*- makefile -*-
-# Copyright 2019 The Chromium OS Authors. All rights reserved.
+# Copyright 2019 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
diff --git a/board/dalboz/ec.tasklist b/board/dalboz/ec.tasklist
index 41b83cf4f3..4bb60ed55d 100644
--- a/board/dalboz/ec.tasklist
+++ b/board/dalboz/ec.tasklist
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/board/dalboz/gpio.inc b/board/dalboz/gpio.inc
index 74fe019b47..386898f013 100644
--- a/board/dalboz/gpio.inc
+++ b/board/dalboz/gpio.inc
@@ -1,6 +1,6 @@
/* -*- mode:c -*-
*
- * Copyright 2019 The Chromium OS Authors. All rights reserved.
+ * Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/board/dalboz/led.c b/board/dalboz/led.c
index 53e94e84d6..d9614539e5 100644
--- a/board/dalboz/led.c
+++ b/board/dalboz/led.c
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -8,44 +8,51 @@
#include "led_common.h"
#include "led_onoff_states.h"
-#define LED_OFF_LVL 1
-#define LED_ON_LVL 0
+#define LED_OFF_LVL 1
+#define LED_ON_LVL 0
__override const int led_charge_lvl_1;
__override const int led_charge_lvl_2 = 100;
__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} },
- [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} },
- [STATE_DISCHARGE_S0] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} },
- [STATE_DISCHARGE_S3] = {{EC_LED_COLOR_RED, 1 * LED_ONE_SEC},
- {LED_OFF, 3 * LED_ONE_SEC} },
- [STATE_DISCHARGE_S5] = {{LED_OFF, LED_INDEFINITE} },
- [STATE_BATTERY_ERROR] = {{EC_LED_COLOR_GREEN, 2 * LED_ONE_SEC},
- {EC_LED_COLOR_RED, 2 * LED_ONE_SEC} },
- [STATE_FACTORY_TEST] = {{EC_LED_COLOR_GREEN, LED_INDEFINITE} },
-};
+ 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 } },
+ [STATE_CHARGING_FULL_CHARGE] = { { EC_LED_COLOR_GREEN,
+ LED_INDEFINITE } },
+ [STATE_DISCHARGE_S0] = { { EC_LED_COLOR_GREEN,
+ LED_INDEFINITE } },
+ [STATE_DISCHARGE_S3] = { { EC_LED_COLOR_RED, 1 * LED_ONE_SEC },
+ { LED_OFF, 3 * LED_ONE_SEC } },
+ [STATE_DISCHARGE_S5] = { { LED_OFF, LED_INDEFINITE } },
+ [STATE_BATTERY_ERROR] = { { EC_LED_COLOR_GREEN,
+ 2 * LED_ONE_SEC },
+ { EC_LED_COLOR_RED,
+ 2 * LED_ONE_SEC } },
+ [STATE_FACTORY_TEST] = { { EC_LED_COLOR_GREEN,
+ LED_INDEFINITE } },
+ };
BUILD_ASSERT(ARRAY_SIZE(led_bat_state_table) == LED_NUM_STATES);
__override const struct led_descriptor
- led_pwr_state_table[PWR_LED_NUM_STATES][LED_NUM_PHASES] = {
- [PWR_LED_STATE_ON] = {{EC_LED_COLOR_WHITE, LED_INDEFINITE} },
- [PWR_LED_STATE_SUSPEND_AC] = {{EC_LED_COLOR_WHITE, 3 * LED_ONE_SEC},
- {LED_OFF, 0.5 * LED_ONE_SEC} },
- [PWR_LED_STATE_SUSPEND_NO_AC] = {{LED_OFF, LED_INDEFINITE} },
- [PWR_LED_STATE_OFF] = {{LED_OFF, LED_INDEFINITE} },
-};
+ led_pwr_state_table[PWR_LED_NUM_STATES][LED_NUM_PHASES] = {
+ [PWR_LED_STATE_ON] = { { EC_LED_COLOR_WHITE, LED_INDEFINITE } },
+ [PWR_LED_STATE_SUSPEND_AC] = { { EC_LED_COLOR_WHITE,
+ 3 * LED_ONE_SEC },
+ { LED_OFF, 0.5 * LED_ONE_SEC } },
+ [PWR_LED_STATE_SUSPEND_NO_AC] = { { LED_OFF, LED_INDEFINITE } },
+ [PWR_LED_STATE_OFF] = { { LED_OFF, LED_INDEFINITE } },
+ };
BUILD_ASSERT(ARRAY_SIZE(led_pwr_state_table) == PWR_LED_NUM_STATES);
-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);