From: Archana Patni Date: Mon, 19 Mar 2012 13:24:31 +0000 (+0530) Subject: libsensors: Added Proximity sensor configuration changes for BDW-WSB X-Git-Tag: android-x86-6.0-r1~9 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fhardware-intel-libsensors.git;a=commitdiff_plain;h=7613f3492958e096b6793b34848336fa0f796eaa libsensors: Added Proximity sensor configuration changes for BDW-WSB This patch adds configuration changes for Proximity Sensor for BDW-WSB. Change-Id: I3cc84d66c2a2adebcc6bd16e371937ca51202c9c Signed-off-by: Archana Patni Reviewed-on: https://android.intel.com/162379 Reviewed-by: Sesha, Subramony Tested-by: Sesha, Subramony Reviewed-by: Lilja, Ola --- diff --git a/bdw_wsb/Android.mk b/bdw_wsb/Android.mk index 0389625..76bf1fa 100644 --- a/bdw_wsb/Android.mk +++ b/bdw_wsb/Android.mk @@ -36,6 +36,7 @@ sensor_src_files := $(common_src_path)/HidSensor_Accel3D.cpp \ $(common_src_path)/HidSensor_Gyro3D.cpp \ $(common_src_path)/HidSensor_Compass3D.cpp \ $(common_src_path)/HidSensor_ALS.cpp \ + $(common_src_path)/HidSensor_Proximity.cpp \ $(common_src_path)/RotVecSensor.cpp \ $(common_src_path)/SynthCompassSensor.cpp \ $(common_src_path)/OrientationSensor.cpp \ diff --git a/bdw_wsb/BoardConfig.cpp b/bdw_wsb/BoardConfig.cpp index 9b9352b..b6ae686 100644 --- a/bdw_wsb/BoardConfig.cpp +++ b/bdw_wsb/BoardConfig.cpp @@ -28,6 +28,7 @@ #include "HidSensor_Gyro3D.h" #include "HidSensor_Compass3D.h" #include "HidSensor_ALS.h" +#include "HidSensor_Proximity.h" #include "OrientationSensor.h" #include "RotVecSensor.h" #include "SynthCompassSensor.h" @@ -37,6 +38,7 @@ static const struct sensor_t sSensorList[] = { GyroSensor::sSensorInfo_gyro3D, SynthCompassSensor::sSensorInfo_compass, ALSSensor::sSensorInfo_als, + ProximitySensor::sSensorInfo_proximity, RotVecSensor::sSensorInfo_rotvec, OrientationSensor::sSensorInfo_orientation, }; @@ -99,6 +101,7 @@ void BoardConfig::initSensors(SensorBase* sensors[]) sensors[gyro] = new GyroSensor(); sensors[compass] = new CompassSensor(); sensors[light] = new ALSSensor(); + sensors[proximity] = new ProximitySensor(); sensors[rotvec] = new RotVecSensor(); sensors[syncompass] = new SynthCompassSensor(); sensors[orientation] = new OrientationSensor(); @@ -124,6 +127,8 @@ int BoardConfig::handleToDriver(int handle) return syncompass; case ID_O: return orientation; + case ID_P: + return proximity; default: return -EINVAL; } diff --git a/bdw_wsb/SensorConfig.h b/bdw_wsb/SensorConfig.h index ebf185a..755b7cb 100644 --- a/bdw_wsb/SensorConfig.h +++ b/bdw_wsb/SensorConfig.h @@ -30,6 +30,7 @@ enum { rotvec, syncompass, orientation, + proximity, numSensorDrivers, numFds, };