summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2019-08-07 17:31:42 -0700
committerCommit Bot <commit-bot@chromium.org>2019-08-09 00:20:03 +0000
commita97c780a95c673af63d061cbcc7c6d82a1716cfc (patch)
tree8ee479ecb8dcc071e93e34173bdf98ff463ac35f
parent672d90748a075c59125358f5c21384f552b6abb1 (diff)
downloadchrome-ec-a97c780a95c673af63d061cbcc7c6d82a1716cfc.tar.gz
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 <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1743213 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
-rw-r--r--board/kohaku/board.c6
-rw-r--r--board/kohaku/board.h4
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,