summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSue Chen <sue.chen@quanta.corp-partner.google.com>2022-04-11 10:18:36 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-11 08:32:04 +0000
commit8091b5449fa9284be4b80f5e5f30b0f839bb9cc6 (patch)
tree8f7a4d73ed4a39af9bf794e4073ab8dcd2e4a7a1
parent7f2c2b43b24accd53c8eed5d5d6714f6840c5a6a (diff)
downloadchrome-ec-8091b5449fa9284be4b80f5e5f30b0f839bb9cc6.tar.gz
Scout: delay 1s to initialize ambient light sensor
Let sensor only active in S0 and set CONFIG_MOTION_SENSE_RESUME_DELAY_US 1000 msec for ALS sensor is powered by PP3300_S. BUG=b:228772482 BRANCH=puff TEST=ALS sensor function pass Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I52120834d60d3786789f893edea65522f7b5c20b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3581360 Reviewed-by: Joe Tessler <jrt@chromium.org> Commit-Queue: Joe Tessler <jrt@chromium.org> (cherry picked from commit 42a726797086af9f2f51cb8ae58afbb7f9b40114) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3581817
-rw-r--r--board/scout/board.c4
-rw-r--r--board/scout/board.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/board/scout/board.c b/board/scout/board.c
index a11cb4cb05..6758828ae0 100644
--- a/board/scout/board.c
+++ b/board/scout/board.c
@@ -100,7 +100,7 @@ static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = {
struct motion_sensor_t motion_sensors[] = {
[CLEAR_ALS] = {
.name = "Clear Light",
- .active_mask = SENSOR_ACTIVE_S0_S3,
+ .active_mask = SENSOR_ACTIVE_S0,
.chip = MOTIONSENSE_CHIP_TCS3400,
.type = MOTIONSENSE_TYPE_LIGHT,
.location = MOTIONSENSE_LOC_BASE,
@@ -121,7 +121,7 @@ struct motion_sensor_t motion_sensors[] = {
},
[RGB_ALS] = {
.name = "RGB Light",
- .active_mask = SENSOR_ACTIVE_S0_S3,
+ .active_mask = SENSOR_ACTIVE_S0,
.chip = MOTIONSENSE_CHIP_TCS3400,
.type = MOTIONSENSE_TYPE_LIGHT_RGB,
.location = MOTIONSENSE_LOC_BASE,
diff --git a/board/scout/board.h b/board/scout/board.h
index 154e271579..802a4a3b1f 100644
--- a/board/scout/board.h
+++ b/board/scout/board.h
@@ -53,6 +53,8 @@
EC_CMD_CONSOLE_SNAPSHOT, EC_CMD_CONSOLE_READ, EC_CMD_PD_GET_LOG_ENTRY
/* Sensor */
+#undef CONFIG_MOTION_SENSE_RESUME_DELAY_US
+#define CONFIG_MOTION_SENSE_RESUME_DELAY_US (1000 * MSEC)
#define CONFIG_ACCEL_INTERRUPTS
#define CONFIG_CMD_ACCEL_INFO
/* Enable sensor fifo, must also define the _SIZE and _THRES */