summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/motion_sense.c5
-rw-r--r--include/ec_commands.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index 4bf2e7293f..eea52d394e 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -141,6 +141,9 @@ void motion_sense_task(void)
return;
}
+ /* Write to status byte to represent that accelerometers are present. */
+ *lpc_status |= EC_MEMMAP_ACC_STATUS_PRESENCE_BIT;
+
while (1) {
ts0 = get_time();
@@ -194,7 +197,7 @@ void motion_sense_task(void)
*/
sample_id = (sample_id + 1) &
EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK;
- *lpc_status = sample_id;
+ *lpc_status = EC_MEMMAP_ACC_STATUS_PRESENCE_BIT | sample_id;
#ifdef CONFIG_CMD_LID_ANGLE
diff --git a/include/ec_commands.h b/include/ec_commands.h
index b3d221d7cf..1913361250 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -88,6 +88,7 @@
/* Define the format of the accelerometer mapped memory status byte. */
#define EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK 0x0f
#define EC_MEMMAP_ACC_STATUS_BUSY_BIT (1 << 4)
+#define EC_MEMMAP_ACC_STATUS_PRESENCE_BIT (1 << 7)
/* Number of temp sensors at EC_MEMMAP_TEMP_SENSOR */
#define EC_TEMP_SENSOR_ENTRIES 16