From 42a726797086af9f2f51cb8ae58afbb7f9b40114 Mon Sep 17 00:00:00 2001 From: Sue Chen Date: Mon, 11 Apr 2022 10:18:36 +0800 Subject: 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 Change-Id: I52120834d60d3786789f893edea65522f7b5c20b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3581360 Reviewed-by: Joe Tessler Commit-Queue: Joe Tessler --- board/scout/board.c | 4 ++-- board/scout/board.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'board') diff --git a/board/scout/board.c b/board/scout/board.c index 6e2b2d1e4e..ce0ee8ceae 100644 --- a/board/scout/board.c +++ b/board/scout/board.c @@ -98,7 +98,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, @@ -119,7 +119,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 67b9c3bdeb..6985742439 100644 --- a/board/scout/board.h +++ b/board/scout/board.h @@ -50,6 +50,8 @@ #define CONFIG_SHA256 /* 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 */ -- cgit v1.2.1