diff options
-rw-r--r-- | board/coral/board.c | 52 | ||||
-rw-r--r-- | board/coral/board.h | 14 |
2 files changed, 1 insertions, 65 deletions
diff --git a/board/coral/board.c b/board/coral/board.c index ff4ce97698..e12b7543f6 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -225,14 +225,6 @@ struct i2c_stress_test i2c_stress_tests[] = { }, #endif -#ifdef CONFIG_CMD_I2C_STRESS_TEST_ALS - { - .port = I2C_PORT_ALS, - .addr = OPT3001_I2C_ADDR1, - .i2c_test = &opt3001_i2c_stress_test_dev, - }, -#endif - /* NPCX_I2C_PORT3 */ #ifdef CONFIG_CMD_I2C_STRESS_TEST_BATTERY { @@ -837,9 +829,6 @@ const matrix_3x3_t mag_standard_ref = { /* sensor private data */ static struct kionix_accel_data g_kx022_data; static struct bmi160_drv_data_t g_bmi160_data; -static struct opt3001_drv_data_t g_opt3001_data = { - .attenuation = 5, -}; /* FIXME(dhendrix): Copied from Amenia, probably need to tweak for Coral */ struct motion_sensor_t motion_sensors[] = { @@ -952,50 +941,9 @@ struct motion_sensor_t motion_sensors[] = { }, }, }, - - [LID_ALS] = { - .name = "Light", - .active_mask = SENSOR_ACTIVE_S0_S3, - .chip = MOTIONSENSE_CHIP_OPT3001, - .type = MOTIONSENSE_TYPE_LIGHT, - .location = MOTIONSENSE_LOC_LID, - .drv = &opt3001_drv, - .drv_data = &g_opt3001_data, - .port = I2C_PORT_ALS, - .addr = OPT3001_I2C_ADDR1, - .rot_standard_ref = NULL, - .default_range = OPT3001_RANGE_AUTOMATIC_FULL_SCALE, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S0] = { - .odr = 1000, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, - }, }; unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); -/* ALS instances when LPC mapping is needed. Each entry directs to a sensor. */ -const struct motion_sensor_t *motion_als_sensors[] = { - &motion_sensors[LID_ALS], -}; -BUILD_ASSERT(ARRAY_SIZE(motion_als_sensors) == ALS_COUNT); - void board_hibernate(void) { /* diff --git a/board/coral/board.h b/board/coral/board.h index 4fadb6728a..72245bfea9 100644 --- a/board/coral/board.h +++ b/board/coral/board.h @@ -189,7 +189,6 @@ /* I2C ports */ #define I2C_PORT_GYRO NPCX_I2C_PORT1 #define I2C_PORT_LID_ACCEL NPCX_I2C_PORT2 -#define I2C_PORT_ALS NPCX_I2C_PORT2 #define I2C_PORT_BATTERY NPCX_I2C_PORT3 #define I2C_PORT_CHARGER NPCX_I2C_PORT3 /* Accelerometer and Gyroscope are the same device. */ @@ -203,7 +202,6 @@ #define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) #define CONFIG_MAG_CALIBRATE #define CONFIG_ACCEL_KX022 -#define CONFIG_ALS_OPT3001 #define CONFIG_LID_ANGLE #define CONFIG_LID_ANGLE_UPDATE #define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL @@ -265,14 +263,6 @@ enum temp_sensor_id { }; /* - * For backward compatibility, to report ALS via ACPI, - * Define the number of ALS sensors: motion_sensor copy the data to the ALS - * memmap region. - */ -#define CONFIG_ALS -#define ALS_COUNT 1 - -/* * Motion sensors: * When reading through IO memory is set up for sensors (LPC is used), * the first 2 entries must be accelerometers, then gyroscope. @@ -282,7 +272,6 @@ enum sensor_id { LID_ACCEL, BASE_ACCEL, BASE_GYRO, - LID_ALS, }; #define CONFIG_HOSTCMD_SKUID @@ -334,8 +323,7 @@ void board_set_tcpc_power_mode(int port, int mode); void board_tcpc_init(void); /* Sensors without hardware FIFO are in forced mode */ -#define CONFIG_ACCEL_FORCE_MODE_MASK \ - ((1 << LID_ACCEL) | (1 << LID_ALS)) +#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) #endif /* !__ASSEMBLER__ */ |