diff options
-rw-r--r-- | board/kakadu/board.c | 92 | ||||
-rw-r--r-- | board/kakadu/board.h | 11 |
2 files changed, 0 insertions, 103 deletions
diff --git a/board/kakadu/board.c b/board/kakadu/board.c index 422036b409..11a2388cd7 100644 --- a/board/kakadu/board.c +++ b/board/kakadu/board.c @@ -15,7 +15,6 @@ #include "common.h" #include "console.h" #include "driver/accelgyro_bmi160.h" -#include "driver/als_tcs3400.h" #include "driver/charger/rt946x.h" #include "driver/sync.h" #include "driver/tcpm/mt6370.h" @@ -296,59 +295,6 @@ static struct mutex g_lid_mutex; static struct bmi160_drv_data_t g_bmi160_data; -/* TCS3400 private data */ -static struct als_drv_data_t g_tcs3400_data = { - .als_cal.scale = 1, - .als_cal.uscale = 0, - .als_cal.offset = 0, - .als_cal.channel_scale = { - .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kc */ - .cover_scale = ALS_CHANNEL_SCALE(1.0), /* CT */ - }, -}; - -static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = { - /* - * TODO(b:139366662): calculates the actual coefficients and scaling - * factors - */ - .rgb_cal[X] = { - .offset = 0, - .scale = { - .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kr */ - .cover_scale = ALS_CHANNEL_SCALE(1.0) - }, - .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0), - }, - .rgb_cal[Y] = { - .offset = 0, - .scale = { - .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kg */ - .cover_scale = ALS_CHANNEL_SCALE(1.0) - }, - .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.1), - }, - .rgb_cal[Z] = { - .offset = 0, - .scale = { - .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kb */ - .cover_scale = ALS_CHANNEL_SCALE(1.0) - }, - .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0), - .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0), - }, - .saturation.again = TCS_DEFAULT_AGAIN, - .saturation.atime = TCS_DEFAULT_ATIME, -}; - /* Matrix to rotate accelerometer into standard reference frame */ static const mat33_fp_t lid_standard_ref = { {FLOAT_TO_FP(-1), 0, 0}, @@ -401,41 +347,6 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, }, - [CLEAR_ALS] = { - .name = "Clear Light", - .active_mask = SENSOR_ACTIVE_S0_S3, - .chip = MOTIONSENSE_CHIP_TCS3400, - .type = MOTIONSENSE_TYPE_LIGHT, - .location = MOTIONSENSE_LOC_LID, - .drv = &tcs3400_drv, - .drv_data = &g_tcs3400_data, - .port = I2C_PORT_ALS, - .i2c_spi_addr_flags = TCS3400_I2C_ADDR_FLAGS, - .rot_standard_ref = NULL, - .default_range = 0x10000, /* scale = 1x, uscale = 0 */ - .min_frequency = TCS3400_LIGHT_MIN_FREQ, - .max_frequency = TCS3400_LIGHT_MAX_FREQ, - .config = { - /* Run ALS sensor in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 1000, - }, - }, - }, - [RGB_ALS] = { - .name = "RGB Light", - .active_mask = SENSOR_ACTIVE_S0_S3, - .chip = MOTIONSENSE_CHIP_TCS3400, - .type = MOTIONSENSE_TYPE_LIGHT_RGB, - .location = MOTIONSENSE_LOC_LID, - .drv = &tcs3400_rgb_drv, - .drv_data = &g_tcs3400_rgb_data, - /*.port = I2C_PORT_ALS,*/ /* Unused. RGB channels read by CLEAR_ALS. */ - .rot_standard_ref = NULL, - .default_range = 0x10000, /* scale = 1x, uscale = 0 */ - .min_frequency = 0, /* 0 indicates we should not use sensor directly */ - .max_frequency = 0, /* 0 indicates we should not use sensor directly */ - }, [VSYNC] = { .name = "Camera vsync", .active_mask = SENSOR_ACTIVE_S0, @@ -449,9 +360,6 @@ struct motion_sensor_t motion_sensors[] = { }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); -const struct motion_sensor_t *motion_als_sensors[] = { - &motion_sensors[CLEAR_ALS], -}; #endif /* VARIANT_KUKUI_NO_SENSORS */ void usb_charger_set_switches(int port, enum usb_switch setting) diff --git a/board/kakadu/board.h b/board/kakadu/board.h index 88578fed06..5a41561850 100644 --- a/board/kakadu/board.h +++ b/board/kakadu/board.h @@ -38,14 +38,6 @@ #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) -#define CONFIG_ALS - -#define ALS_COUNT 1 -#define CONFIG_ALS_TCS3400 -#define CONFIG_ALS_TCS3400_INT_EVENT \ - TASK_EVENT_MOTION_SENSOR_INTERRUPT(CLEAR_ALS) -#define CONFIG_ALS_TCS3400_EMULATED_IRQ_EVENT -#define CONFIG_ACCEL_FORCE_MODE_MASK BIT(CLEAR_ALS) /* Camera VSYNC */ #define CONFIG_SYNC @@ -62,7 +54,6 @@ #define I2C_PORT_VIRTUAL_BATTERY I2C_PORT_BATTERY #define I2C_PORT_ACCEL 1 #define I2C_PORT_BC12 1 -#define I2C_PORT_ALS 1 /* Route sbs host requests to virtual battery driver */ #define VIRTUAL_BATTERY_ADDR_FLAGS 0x0B @@ -104,8 +95,6 @@ enum power_signal { enum sensor_id { LID_ACCEL = 0, LID_GYRO, - CLEAR_ALS, - RGB_ALS, VSYNC, SENSOR_COUNT, }; |