From a97c780a95c673af63d061cbcc7c6d82a1716cfc Mon Sep 17 00:00:00 2001 From: Scott Collyer Date: Wed, 7 Aug 2019 17:31:42 -0700 Subject: kohaku: Change location for bh1730 ALS The bh1730 ALS, used for keyboard backlight control is located in the base, not the lid. This CL changes the location field in the sensor config table and associated sensor enum value. BRANCH=none BUG=b:138866924 TEST=make -j BOARD=kohaku Change-Id: I7d46cefe7d092a77604f8f239f16e8c813a04bdf Signed-off-by: Scott Collyer Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1743213 Tested-by: Scott Collyer Reviewed-by: Tim Wawrzynczak Commit-Queue: Scott Collyer --- board/kohaku/board.c | 6 +++--- board/kohaku/board.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/board/kohaku/board.c b/board/kohaku/board.c index bea950fe89..07292012bf 100644 --- a/board/kohaku/board.c +++ b/board/kohaku/board.c @@ -284,12 +284,12 @@ struct motion_sensor_t motion_sensors[] = { .max_frequency = BMI160_GYRO_MAX_FREQ, }, - [LID_ALS] = { + [BASE_ALS] = { .name = "Light", .active_mask = SENSOR_ACTIVE_S0, .chip = MOTIONSENSE_CHIP_BH1730, .type = MOTIONSENSE_TYPE_LIGHT, - .location = MOTIONSENSE_LOC_LID, + .location = MOTIONSENSE_LOC_BASE, .drv = &bh1730_drv, .drv_data = &g_bh1730_data, .port = I2C_PORT_ACCEL, @@ -360,7 +360,7 @@ 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], + &motion_sensors[BASE_ALS], &motion_sensors[CLEAR_ALS], }; BUILD_ASSERT(ARRAY_SIZE(motion_als_sensors) == ALS_COUNT); diff --git a/board/kohaku/board.h b/board/kohaku/board.h index ef2e2109a9..beb23a0580 100644 --- a/board/kohaku/board.h +++ b/board/kohaku/board.h @@ -54,7 +54,7 @@ /* Sensors without hardware FIFO are in forced mode */ #define CONFIG_ACCEL_FORCE_MODE_MASK \ - (BIT(LID_ACCEL) | BIT(LID_ALS) | BIT(CLEAR_ALS)) + (BIT(LID_ACCEL) | BIT(BASE_ALS) | BIT(CLEAR_ALS)) /* Parameter to calculate LUX on Kohaku */ /* @@ -144,7 +144,7 @@ enum sensor_id { LID_ACCEL = 0, BASE_ACCEL, BASE_GYRO, - LID_ALS, + BASE_ALS, VSYNC, CLEAR_ALS, RGB_ALS, -- cgit v1.2.1