cleanup: rename motion sensor CONFIG_ options

This renames some motion sensor options to start with more
consistent prefixes.

For gesture (tap) detection:

  CONFIG_GESTURE_DETECTION:
    CONFIG_SENSOR_BATTERY_TAP   =>    CONFIG_GESTURE_SENSOR_BATTERY_TAP

For detecting lid angle:

  CONFIG_LID_ANGLE:
    CONFIG_SENSOR_BASE          =>    CONFIG_LID_ANGLE_SENSOR_BASE
    CONFIG_SENSOR_LID           =>    CONFIG_LID_ANGLE_SENSOR_LID

BUG=none
BRANCH=none
TEST=make buildall

Change-Id: Ib8f645902a5585346e1d8d2cbf73d825c896a521
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/268777
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Bill Richardson
2015-04-30 14:27:14 -07:00
committed by ChromeOS Commit Bot
parent 6dce2424d9
commit 99737a2fef
7 changed files with 24 additions and 22 deletions

View File

@@ -52,8 +52,8 @@
/* Motion */
#define CONFIG_ACCEL_KXCJ9
#define CONFIG_SENSOR_BASE 0
#define CONFIG_SENSOR_LID 1
#define CONFIG_LID_ANGLE_SENSOR_BASE 0
#define CONFIG_LID_ANGLE_SENSOR_LID 1
#define CONFIG_LID_ANGLE
/* Modules we want to exclude */

View File

@@ -193,14 +193,14 @@ void bkboost_det_interrupt(enum gpio_signal signal);
void set_pp5000_in_g3(int mask, int enable);
/* Define for sensor tasks */
#define CONFIG_SENSOR_BATTERY_TAP 0
#define CONFIG_GESTURE_SENSOR_BATTERY_TAP 0
#define CONFIG_GESTURE_TAP_OUTER_WINDOW_T 200
#define CONFIG_GESTURE_TAP_INNER_WINDOW_T 30
#define CONFIG_GESTURE_TAP_MIN_INTERSTICE_T 120
#define CONFIG_GESTURE_TAP_MAX_INTERSTICE_T 500
#define CONFIG_SENSOR_BASE 0
#define CONFIG_SENSOR_LID 1
#define CONFIG_LID_ANGLE_SENSOR_BASE 0
#define CONFIG_LID_ANGLE_SENSOR_LID 1
#endif /* !__ASSEMBLER__ */

View File

@@ -59,8 +59,8 @@
#define CONFIG_CMD_ACCELS
#define CONFIG_CMD_ACCEL_INFO
#define CONFIG_LID_ANGLE
#define CONFIG_SENSOR_BASE 0
#define CONFIG_SENSOR_LID 1
#define CONFIG_LID_ANGLE_SENSOR_BASE 0
#define CONFIG_LID_ANGLE_SENSOR_LID 1
/* Modules we want to exclude */
#undef CONFIG_EEPROM

View File

@@ -73,7 +73,7 @@ enum tap_states {
/* Tap sensor to use */
static struct motion_sensor_t *sensor =
&motion_sensors[CONFIG_SENSOR_BATTERY_TAP];
&motion_sensors[CONFIG_GESTURE_SENSOR_BATTERY_TAP];
/* Tap state information */
static int history_z[MAX_WINDOW]; /* Changes in Z */

View File

@@ -47,8 +47,10 @@ static int lid_angle_is_reliable;
/* Pointer to constant acceleration orientation data. */
const struct accel_orientation * const p_acc_orient = &acc_orient;
struct motion_sensor_t *accel_base = &motion_sensors[CONFIG_SENSOR_BASE];
struct motion_sensor_t *accel_lid = &motion_sensors[CONFIG_SENSOR_LID];
struct motion_sensor_t *accel_base =
&motion_sensors[CONFIG_LID_ANGLE_SENSOR_BASE];
struct motion_sensor_t *accel_lid =
&motion_sensors[CONFIG_LID_ANGLE_SENSOR_LID];
/**
* Calculate the lid angle using two acceleration vectors, one recorded in

View File

@@ -660,10 +660,13 @@
/*****************************************************************************/
/* Motion sensor based gesture recognition information */
/* These all require HAS_TASK_MOTIONSENSE to work */
/* Do we want to detect gestures? */
#undef CONFIG_GESTURE_DETECTION
#ifndef CONFIG_GESTURE_DETECTION
/* Which sensor to look for gesture recognition */
#undef CONFIG_SENSOR_BATTERY_TAP
#undef CONFIG_GESTURE_SENSOR_BATTERY_TAP
/* Sensor sampling interval for gesture recognition */
#undef CONFIG_GESTURE_SAMPLING_INTERVAL_MS
/*
@@ -682,23 +685,20 @@
#undef CONFIG_GESTURE_TAP_MIN_INTERSTICE_T
#undef CONFIG_GESTURE_TAP_MAX_INTERSTICE_T
#endif
/* Do we want to detect the lid angle? */
#undef CONFIG_LID_ANGLE
#ifndef CONFIG_LID_ANGLE
#undef CONFIG_SENSOR_BASE
#undef CONFIG_SENSOR_LID
/* Which sensor is located on the base? */
#undef CONFIG_LID_ANGLE_SENSOR_BASE
/* Which sensor is located on the lid? */
#undef CONFIG_LID_ANGLE_SENSOR_LID
/*
* Allows using the lid angle measurement to determine if key scanning should
* be enabled or disabled when chipset is suspended.
*/
#undef CONFIG_LID_ANGLE_KEY_SCAN
#endif
/*****************************************************************************/
/*
* Support the host asking the EC about the status of the most recent host
* command.

View File

@@ -52,8 +52,8 @@
#ifdef TEST_MOTION_LID
#define CONFIG_LID_ANGLE
#define CONFIG_SENSOR_BASE 0
#define CONFIG_SENSOR_LID 1
#define CONFIG_LID_ANGLE_SENSOR_BASE 0
#define CONFIG_LID_ANGLE_SENSOR_LID 1
#endif
#ifdef TEST_SBS_CHARGING