summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-10-13 12:12:51 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2016-08-01 16:40:59 +0000
commitfb83c8238b24ece447ce9faa32ab6b536ed1dea3 (patch)
treebb828fc3f68fae5c51087867bb51cddc06e6f31b
parent31d0b45ceac789802e9a860598055752d23c1fe7 (diff)
downloadchrome-ec-fb83c8238b24ece447ce9faa32ab6b536ed1dea3.tar.gz
BACKPORT: 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, cyan TEST=compile BUG=b:27849483 Change-Id: I39acfeaefef51d142a587940bccb02db86e87068 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/305570 Reviewed-by: Alec Berg <alecaberg@chromium.org> (cherry picked from commit c8844123923f8b65f38a7d16aaac3e9ce774ce2c) Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/359386
-rw-r--r--common/motion_sense.c22
-rw-r--r--include/motion_sense.h10
2 files changed, 16 insertions, 16 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/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