driver: si114x: Add ALS/Proxy sensor SI114x

Add the Silicon Image sensors, add it to the motion_sense module
to be used with the FIFO.

BRANCH=smaug
TEST=Check light and proxy on Smaug:
Check Light value in Lux are reasonable.
Check Proxy is detecting object, but value are in opposite of distance.
BUG=chrome-os-partner:32829

Change-Id: I11419a0f0613f0fae9323f99deedf5a1e6c6e29c
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/291335
Reviewed-by: Sheng-liang Song <ssl@chromium.org>
This commit is contained in:
Gwendal Grignou
2015-08-06 11:59:54 -07:00
committed by ChromeOS Commit Bot
parent 59138ad097
commit bbbbde0fc0
5 changed files with 807 additions and 2 deletions

View File

@@ -71,6 +71,15 @@
#undef CONFIG_ALS
#undef CONFIG_ALS_ISL29035
#undef CONFIG_ALS_OPT3001
/* Define the exact model ID present on the board: SI1141 = 41, SI1142 = 42, */
#undef CONFIG_ALS_SI114X
/* Check if the device revision is supported */
#undef CONFIG_ALS_SI114X_CHECK_REVISION
/*
* Define the event to raise when BMI160 interrupt.
* Must be within TASK_EVENT_MOTION_INTERRUPT_MASK.
*/
#undef CONFIG_ALS_SI114X_INT_EVENT
/* Support AP hang detection host command and state machine */
#undef CONFIG_AP_HANG_DETECT

View File

@@ -1709,14 +1709,16 @@ enum motionsensor_type {
MOTIONSENSE_TYPE_ACCEL = 0,
MOTIONSENSE_TYPE_GYRO = 1,
MOTIONSENSE_TYPE_MAG = 2,
MOTIONSENSE_TYPE_MAX = 3,
MOTIONSENSE_TYPE_PROX = 3,
MOTIONSENSE_TYPE_LIGHT = 4,
MOTIONSENSE_TYPE_MAX,
};
/* List of motion sensor locations. */
enum motionsensor_location {
MOTIONSENSE_LOC_BASE = 0,
MOTIONSENSE_LOC_LID = 1,
MOTIONSENSE_LOC_MAX = 2,
MOTIONSENSE_LOC_MAX,
};
/* List of motion sensor chips. */
@@ -1724,6 +1726,9 @@ enum motionsensor_chip {
MOTIONSENSE_CHIP_KXCJ9 = 0,
MOTIONSENSE_CHIP_LSM6DS0 = 1,
MOTIONSENSE_CHIP_BMI160 = 2,
MOTIONSENSE_CHIP_SI1141 = 3,
MOTIONSENSE_CHIP_SI1142 = 4,
MOTIONSENSE_CHIP_SI1143 = 5,
};
struct ec_response_motion_sensor_data {