summaryrefslogtreecommitdiff
path: root/board/nami
diff options
context:
space:
mode:
authorElthan_Huang <elthan_huang@compal.corp-partner.google.com>2018-03-22 11:45:30 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-22 18:16:48 -0700
commit80c8ed85858ba61b2d9a00d56df7540b492fa15e (patch)
tree8ef510112587ba134c35dd8c4f0c3b2f4803848d /board/nami
parent7742e06e45db3d12450b193cedacdc1171fbf85b (diff)
downloadchrome-ec-80c8ed85858ba61b2d9a00d56df7540b492fa15e.tar.gz
Nami: Add SENSOR_CONFIG_EC_S0 for ALS sensor
EC should sample ALS luminance in S0. Add SENSOR_CONFIG_EC_S0 to let EC to sample the ALS luminance in S0. BUG=b:76115061 BRANCH=none TEST=Verify ALS(OPT3001) luminance can be read in S0 via ec console. Change-Id: I34293c41086ac0228c2bb7f159193a1b59807a63 Signed-off-by: Elthan_Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/974921 Commit-Ready: Gwendal Grignou <gwendal@google.com> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Raymond Chou <raymond_chou@compal.corp-partner.google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@google.com>
Diffstat (limited to 'board/nami')
-rw-r--r--board/nami/board.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/board/nami/board.c b/board/nami/board.c
index 2f393ad6d1..a4a834d582 100644
--- a/board/nami/board.c
+++ b/board/nami/board.c
@@ -640,6 +640,12 @@ struct motion_sensor_t motion_sensors[] = {
.default_range = 0x10000, /* scale = 1; uscale = 0 */
.min_frequency = OPT3001_LIGHT_MIN_FREQ,
.max_frequency = OPT3001_LIGHT_MAX_FREQ,
+ .config = {
+ /* Sensor on in S0 */
+ [SENSOR_CONFIG_EC_S0] = {
+ .odr = 1000,
+ },
+ },
},
};
const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);