summaryrefslogtreecommitdiff
path: root/common/motion_sense.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/motion_sense.c')
-rw-r--r--common/motion_sense.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index df8360229e..12e6d3ca2b 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -127,6 +127,16 @@ void motion_sense_fifo_add_unit(struct ec_response_motion_sensor_data *data,
motion_sense_insert_timestamp();
wake_up_needed = 1;
}
+#ifdef CONFIG_LID_ANGLE_TABLET_MODE
+ data->flags |= (motion_lid_in_tablet_mode() ?
+ MOTIONSENSE_SENSOR_FLAG_TABLET_MODE : 0);
+#elif defined(CONFIG_DPTF_DEVICE_ORIENTATION)
+ /*
+ * TODO(gwendal): When other method finding tablet mode are used.
+ * define them here.
+ */
+#error "Need to set we are in tablet mode"
+#endif
mutex_lock(&g_sensor_mutex);
queue_add_unit(&motion_sense_fifo, data);
mutex_unlock(&g_sensor_mutex);