summaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorsbrissen <sbrissen@hotmail.com>2013-12-19 14:30:57 -0500
committersbrissen <sbrissen@hotmail.com>2013-12-19 14:30:57 -0500
commit4d2fbfd8945f898a9bb523451b9d7ba8918594e7 (patch)
tree26512a8263ca789e00875ec481d4c62e0249ada3 /libsensors
parentece6a2bdcb23a4c3c05d0951636151c4acc9bdf8 (diff)
downloaddevice_samsung_t0lte-4d2fbfd8945f898a9bb523451b9d7ba8918594e7.tar.gz
device_samsung_t0lte-4d2fbfd8945f898a9bb523451b9d7ba8918594e7.tar.bz2
device_samsung_t0lte-4d2fbfd8945f898a9bb523451b9d7ba8918594e7.zip
t0lte: remove initial setDelay from sensors
relies on: http://review.cyanogenmod.org/#/c/56092/ Change-Id: I0c5a83fa6c940b79eb0883603305fe372b513ebc
Diffstat (limited to 'libsensors')
-rw-r--r--libsensors/AccelSensor.cpp2
-rw-r--r--libsensors/AkmSensor.cpp9
-rw-r--r--libsensors/GyroSensor.cpp2
-rw-r--r--libsensors/LightSensor.cpp2
-rw-r--r--libsensors/PressureSensor.cpp2
-rw-r--r--libsensors/ProximitySensor.cpp2
6 files changed, 5 insertions, 14 deletions
diff --git a/libsensors/AccelSensor.cpp b/libsensors/AccelSensor.cpp
index 2902056..2d02bc7 100644
--- a/libsensors/AccelSensor.cpp
+++ b/libsensors/AccelSensor.cpp
@@ -69,7 +69,7 @@ int AccelSensor::enable(int32_t handle, int en) {
if(err >= 0){
mEnabled = flags;
setInitialState();
- setDelay(handle, 60); //Set an initial delay
+
return 0;
}
return -1;
diff --git a/libsensors/AkmSensor.cpp b/libsensors/AkmSensor.cpp
index 58fa387..160df2a 100644
--- a/libsensors/AkmSensor.cpp
+++ b/libsensors/AkmSensor.cpp
@@ -169,7 +169,6 @@ int AkmSensor::enable(int32_t handle, int en)
err = sspEnable(LOGTAG, SSP_MAG, en);
setInitialState();
- setDelay(handle, 66667000); //set an initial delay after enabling
ALOGE_IF(err, "Could not change sensor state (%s)", strerror(-err));
if (!err) {
@@ -205,14 +204,6 @@ int AkmSensor::setDelay(int32_t handle, int64_t ns)
close(fd);
}
- fd = open("/sys/class/sensors/ssp_sensor/ori_poll_delay", O_RDWR);
- if (fd >= 0) {
- char buf[80];
- sprintf(buf, "%lld", ns);
- write(fd, buf, strlen(buf)+1);
- close(fd);
- }
-
mDelays[what] = ns;
return 0;
}
diff --git a/libsensors/GyroSensor.cpp b/libsensors/GyroSensor.cpp
index ff3f6f0..d6dc944 100644
--- a/libsensors/GyroSensor.cpp
+++ b/libsensors/GyroSensor.cpp
@@ -85,7 +85,7 @@ int GyroSensor::enable(int32_t handle, int en) {
mEnabled = flags;
err = sspEnable(LOGTAG, SSP_GYRO, en);
setInitialState();
- setDelay(handle, 66667000); //set an initial delay after enabling
+
return 0;
}
return -1;
diff --git a/libsensors/LightSensor.cpp b/libsensors/LightSensor.cpp
index 8509720..856000b 100644
--- a/libsensors/LightSensor.cpp
+++ b/libsensors/LightSensor.cpp
@@ -95,7 +95,7 @@ int LightSensor::enable(int32_t handle, int en)
if(err >= 0){
mEnabled = flags;
setInitialState();
- setDelay(handle, 66667000); //set an initial delay after enabling
+
return 0;
}
return -1;
diff --git a/libsensors/PressureSensor.cpp b/libsensors/PressureSensor.cpp
index 078204f..0ce514f 100644
--- a/libsensors/PressureSensor.cpp
+++ b/libsensors/PressureSensor.cpp
@@ -80,7 +80,7 @@ int PressureSensor::enable(int32_t handle, int en) {
if(err >= 0){
mEnabled = flags;
setInitialState();
- setDelay(handle, 66667000); //set an initial delay after enabling
+
return 0;
}
return -1;
diff --git a/libsensors/ProximitySensor.cpp b/libsensors/ProximitySensor.cpp
index ede79f8..404bdbc 100644
--- a/libsensors/ProximitySensor.cpp
+++ b/libsensors/ProximitySensor.cpp
@@ -93,7 +93,7 @@ int ProximitySensor::enable(int32_t handle, int en) {
if(err >= 0){
mEnabled = flags;
setInitialState();
- setDelay(handle, 66667000); //set an initial delay after enabling
+
return 0;
}
return -1;