From c8844123923f8b65f38a7d16aaac3e9ce774ce2c Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Tue, 13 Oct 2015 12:12:51 -0700 Subject: motion: fix spelling Fix various spelling errors. Command used: spell include/motion_sense.h | sort | uniq -c | \ grep -v -f ~/tmp/known_words | sort -n > /tmp/checking_spell Appended /tmp/checking_spell to ~/tmp/known_words to avoid C code. BRANCH=smaug TEST=compile BUG=none Change-Id: I39acfeaefef51d142a587940bccb02db86e87068 Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/305570 Reviewed-by: Alec Berg --- common/motion_sense.c | 22 +++++++++++----------- driver/accelgyro_bmi160.c | 8 ++++---- driver/mag_bmm150.c | 2 +- include/motion_sense.h | 10 +++++----- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/common/motion_sense.c b/common/motion_sense.c index bb63dce222..29a0ef8346 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -118,7 +118,7 @@ void motion_sense_fifo_add_unit(struct ec_response_motion_sensor_data *data, /* * BM160 FIFO can return bad data (see chrome-os-partner:43339. - * It looks like an accelrator event. + * It looks like an accelerometer event. * It can happen if we are in middle of setting a new ODR * while we are processing the FIFO. */ @@ -222,7 +222,7 @@ int motion_sense_set_data_rate(struct motion_sensor_t *sensor) int roundup = 0, ec_odr = 0, odr = 0; enum sensor_config config_id; - /* We assume the sensor is initalized */ + /* We assume the sensor is initialized */ /* Check the AP setting first. */ if (sensor_active != SENSOR_ACTIVE_S5) @@ -297,7 +297,7 @@ int motion_sense_set_motion_intervals(void) for (i = 0; i < motion_sensor_count; ++i) { sensor = &motion_sensors[i]; /* - * If the sensor is sleeping, no need to check it periodicaly. + * If the sensor is sleeping, no need to check it periodically. */ if ((sensor->state != SENSOR_INITIALIZED) || (sensor->drv->get_data_rate(sensor) == 0)) @@ -354,7 +354,7 @@ static inline int motion_sense_init(struct motion_sensor_t *sensor) * motion_sense_switch_sensor_rate * * Suspend all sensors that are not needed. - * Mark them as unitialized, they wll lose power and + * Mark them as uninitialized, they will lose power and * need to be initialized again. */ static void motion_sense_switch_sensor_rate(void) @@ -424,7 +424,7 @@ DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, motion_sense_shutdown, static void motion_sense_suspend(void) { /* - * If we are comming from S5, don't enter suspend: + * If we are coming from S5, don't enter suspend: * We will go in SO almost immediately. */ if (sensor_active == SENSOR_ACTIVE_S5) @@ -456,8 +456,8 @@ static void motion_sense_startup(void) } /* If the AP is already in S0, call the resume hook now. - * We may initialize the sensor 2 times (once in RO, anoter time in RW), - * but it may be necessary if the init sequence has changed. + * We may initialize the sensor 2 times (once in RO, another time in + * RW), but it may be necessary if the init sequence has changed. */ if (chipset_in_state(SENSOR_ACTIVE_S0_S3)) motion_sense_suspend(); @@ -494,7 +494,7 @@ static inline void update_sense_data(uint8_t *lpc_status, * assumes little endian, which is what the host expects. Also, * note that we share the lid angle calculation with host only * for debugging purposes. The EC lid angle is an approximation - * with un-calibrated accels. The AP calculates a separate, + * with uncalibrated accelerometers. The AP calculates a separate, * more accurate lid angle. */ #ifdef CONFIG_LID_ANGLE @@ -594,7 +594,7 @@ static int motion_sense_process(struct motion_sensor_t *sensor, /* * Motion Sense Task * Requirement: motion_sensors[] are defined in board.c file. - * Two (minimium) Accelerometers: + * Two (minimum) Accelerometers: * 1 in the A/B(lid, display) and 1 in the C/D(base, keyboard) * Gyro Sensor (optional) */ @@ -1036,7 +1036,7 @@ static int host_cmd_motion_sense(struct host_cmd_handler_args *args) task_set_event(TASK_ID_MOTIONSENSE, TASK_EVENT_MOTION_FLUSH_PENDING, 0); - /* passthrough */ + /* pass-through */ case MOTIONSENSE_CMD_FIFO_INFO: motion_sense_get_fifo_info(&out->fifo_info); for (i = 0; i < motion_sensor_count; i++) { @@ -1278,7 +1278,7 @@ static int command_accel_data_rate(int argc, char **argv) ccprintf("EC rate for sensor %d: %d\n", id, motion_sense_ec_rate(sensor)); ccprintf("Current EC rate: %d\n", motion_interval); - ccprintf("Current Interupt rate: %d\n", motion_int_interval); + ccprintf("Current Interrupt rate: %d\n", motion_int_interval); } return EC_SUCCESS; diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index e248203098..00c5e76090 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -456,7 +456,7 @@ static int set_data_rate(const struct motion_sensor_t *s, #ifdef CONFIG_ACCEL_FIFO /* * FIFO start collecting events. - * They will be discared if AP does not want them. + * They will be discarded if AP does not want them. */ enable_fifo(s, 1); #endif @@ -594,8 +594,8 @@ int perform_calib(const struct motion_sensor_t *s) rate = get_data_rate(s); /* - * Temperary set frequency to 100Hz to get enough data in a short - * period of fime. + * Temporary set frequency to 100Hz to get enough data in a short + * period of time. */ set_data_rate(s, 100000, 0); @@ -674,7 +674,7 @@ int manage_activity(const struct motion_sensor_t *s, if (ret) return ret; if (enable) { - /* We should use paramters from caller */ + /* We should use parameters from caller */ raw_write8(s->addr, BMI160_INT_MOTION_3, BMI160_MOTION_PROOF_TIME( CONFIG_GESTURE_SIGMO_PROOF_MS) << diff --git a/driver/mag_bmm150.c b/driver/mag_bmm150.c index 0f8bc8b102..b5658f2ba3 100644 --- a/driver/mag_bmm150.c +++ b/driver/mag_bmm150.c @@ -4,7 +4,7 @@ */ /** - * BMM150 compass behing a BMI160 + * BMM150 compass behind a BMI160 */ #include "accelgyro.h" diff --git a/include/motion_sense.h b/include/motion_sense.h index ff99c40af4..86d3e87ab8 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -56,7 +56,7 @@ struct motion_data_t { * */ unsigned odr; /* delay between collection by EC, in ms. - * For non FIFO sensor, should be nead 1e6/odr to + * For non FIFO sensor, should be need 1e6/odr to * collect events. * For sensor with FIFO, can be much longer. * 0: no collection. @@ -74,7 +74,7 @@ struct motion_sensor_t { const struct accelgyro_drv *drv; struct mutex *mutex; void *drv_data; - /* i2c address or SPI slage logic GPIO. */ + /* i2c address or SPI slave logic GPIO. */ uint8_t addr; const matrix_3x3_t *rot_standard_ref; @@ -92,8 +92,8 @@ struct motion_sensor_t { * --------+-------------------+-------------------+----------------- * From AP | <------- SENSOR_CONFIG_AP ----------> | * | Use for normal | While sleeping | Always disabled - * | operation: game, | iFor Activity | - * | screen rotatopm | Recognition | + * | operation: game, | For Activity | + * | screen rotation | Recognition | * --------+-------------------+-------------------+------------------ * From EC |SENSOR_CONFIG_EC_S0|SENSOR_CONFIG_EC_S3|SENSOR_CONFIG_EC_S5 * | Background | Gesture Recognition (Double tap, ...) @@ -122,7 +122,7 @@ struct motion_sensor_t { uint16_t lost; /* - * Time since iast collection: + * Time since last collection: * For sensor with hardware FIFO, time since last sample * has move from the hardware FIFO to the FIFO (used if fifo rate != 0). * For sensor without FIFO, time since the last event was collect -- cgit v1.2.1