diff options
-rw-r--r-- | include/ec_commands.h | 19 | ||||
-rw-r--r-- | util/ectool.c | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index b9ef3f08ff..b1b583abdb 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2530,6 +2530,12 @@ enum motionsense_command { */ MOTIONSENSE_CMD_ONLINE_CALIB_READ = 19, + /* + * Activity management + * Retrieve current status of given activity. + */ + MOTIONSENSE_CMD_GET_ACTIVITY = 20, + /* Number of motionsense sub-commands. */ MOTIONSENSE_NUM_CMDS }; @@ -2648,6 +2654,7 @@ enum motionsensor_activity { MOTIONSENSE_ACTIVITY_SIG_MOTION = 1, MOTIONSENSE_ACTIVITY_DOUBLE_TAP = 2, MOTIONSENSE_ACTIVITY_ORIENTATION = 3, + MOTIONSENSE_ACTIVITY_BODY_DETECTION = 4, }; struct ec_motion_sense_activity { @@ -2832,6 +2839,7 @@ struct ec_params_motion_sense { uint32_t max_data_vector; } fifo_read; + /* Used for MOTIONSENSE_CMD_SET_ACTIVITY */ struct ec_motion_sense_activity set_activity; /* Used for MOTIONSENSE_CMD_LID_ANGLE */ @@ -2886,6 +2894,13 @@ struct ec_params_motion_sense { uint8_t sensor_num; } online_calib_read; + /* + * Used for MOTIONSENSE_CMD_GET_ACTIVITY. + */ + struct __ec_todo_unpacked { + uint8_t sensor_num; + uint8_t activity; /* enum motionsensor_activity */ + } get_activity; }; } __ec_todo_packed; @@ -3037,6 +3052,10 @@ struct ec_response_motion_sense { uint16_t hys_degree; } tablet_mode_threshold; + /* USED for MOTIONSENSE_CMD_GET_ACTIVITY. */ + struct __ec_todo_unpacked { + uint8_t state; + } get_activity; }; } __ec_todo_packed; diff --git a/util/ectool.c b/util/ectool.c index 17b72b836c..5111d794b2 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -4860,6 +4860,7 @@ static const struct { ST_BOTH_SIZES(tablet_mode_threshold), ST_BOTH_SIZES(sensor_scale), ST_BOTH_SIZES(online_calib_read), + ST_BOTH_SIZES(get_activity), }; BUILD_ASSERT(ARRAY_SIZE(ms_command_sizes) == MOTIONSENSE_NUM_CMDS); |