diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-10-23 10:50:23 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-10-28 00:23:48 -0700 |
commit | 21c46e7b1300022fcee1e5997b3e9293c47c27ea (patch) | |
tree | 391f5fb1eeb32a85d054ada31b081840ab5654e7 /include/motion_sense.h | |
parent | 7253e57b3c5f415d53558d8e8266c70ff42975a7 (diff) | |
download | chrome-ec-21c46e7b1300022fcee1e5997b3e9293c47c27ea.tar.gz |
motion: Remove duplicate shutdown code
Call shutdown() entry point at init() and remove duplicate code.
shutdown would init the sensor so they would be ready if needed.
Set S5 flag to include G3 (hard off) state, not only S5 (soft off).
BUG=chrome-os-partner:45722
BRANCH=smaug
TEST=When doing a RO->RW transition while AP is in G3, check the sensors
are initialized properly. This issue was found while testng the magic
sequence code.
Change-Id: I647f83580240bf5ba0c340fca3184220abe4c12e
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/308561
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r-- | include/motion_sense.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h index aa4170b722..0c9632ca7e 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -30,7 +30,7 @@ enum sensor_config { SENSOR_CONFIG_MAX, }; -#define SENSOR_ACTIVE_S5 CHIPSET_STATE_SOFT_OFF +#define SENSOR_ACTIVE_S5 (CHIPSET_STATE_SOFT_OFF | CHIPSET_STATE_HARD_OFF) #define SENSOR_ACTIVE_S3 CHIPSET_STATE_SUSPEND #define SENSOR_ACTIVE_S0 CHIPSET_STATE_ON #define SENSOR_ACTIVE_S0_S3 (SENSOR_ACTIVE_S3 | SENSOR_ACTIVE_S0) |