summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilherme <guilherme@guilherme-PC.(none)>2011-05-03 22:29:11 +0200
committerGuilherme <guilherme@guilherme-PC.(none)>2011-05-03 22:29:11 +0200
commit977b1ef4137c1cedf12c25f95260975c8faa4ae7 (patch)
tree7f22630d735808ab45d14da8edb99d514d3fe4d5
parent4ad35a1fb77b782a61959b8d07fd6f626607fc8e (diff)
downloaddevice_samsung_aries-common-977b1ef4137c1cedf12c25f95260975c8faa4ae7.zip
device_samsung_aries-common-977b1ef4137c1cedf12c25f95260975c8faa4ae7.tar.gz
device_samsung_aries-common-977b1ef4137c1cedf12c25f95260975c8faa4ae7.tar.bz2
Removed all the early IOCTL except for lightsensor where it makes sense.
Hopefully no more bootloops...
-rw-r--r--aries/libsensors/CompassSensor.cpp26
-rw-r--r--aries/libsensors/CompassSensor.h1
-rw-r--r--aries/libsensors/Smb380Sensor.cpp27
-rw-r--r--aries/libsensors/Smb380Sensor.h1
4 files changed, 1 insertions, 54 deletions
diff --git a/aries/libsensors/CompassSensor.cpp b/aries/libsensors/CompassSensor.cpp
index 7dcd0fd..e49dd16 100644
--- a/aries/libsensors/CompassSensor.cpp
+++ b/aries/libsensors/CompassSensor.cpp
@@ -64,31 +64,6 @@ CompassSensor::~CompassSensor() {
}
-int CompassSensor::setInitialState() {
-
- LOGD("CompassSensor::~setInitialState()");
- struct input_absinfo absinfo_x;
- struct input_absinfo absinfo_y;
- struct input_absinfo absinfo_z;
- float value;
- if (!ioctl(data_fd, EVIOCGABS(EVENT_TYPE_MAGV_X), &absinfo_x) &&
- !ioctl(data_fd, EVIOCGABS(EVENT_TYPE_MAGV_Y), &absinfo_y) &&
- !ioctl(data_fd, EVIOCGABS(EVENT_TYPE_MAGV_Z), &absinfo_z)) {
- value = absinfo_x.value;
- mPendingEvent.magnetic.x = value * CONVERT_M_X;
- value = absinfo_y.value;
- mPendingEvent.magnetic.y = value * CONVERT_M_Y;
- value = absinfo_z.value;
- mPendingEvent.magnetic.z = value * CONVERT_M_Z;
- mHasPendingEvent = true;
- }
- else
- {
- LOGD("CompassSensor::~setInitialState() ioctl failed");
- }
- return 0;
-}
-
int CompassSensor::enable(int32_t, int en) {
@@ -113,7 +88,6 @@ int CompassSensor::enable(int32_t, int en) {
err = write(fd, buf, sizeof(buf));
close(fd);
mEnabled = flags;
- setInitialState();
return 0;
}
return -1;
diff --git a/aries/libsensors/CompassSensor.h b/aries/libsensors/CompassSensor.h
index 9df0d29..0270431 100644
--- a/aries/libsensors/CompassSensor.h
+++ b/aries/libsensors/CompassSensor.h
@@ -39,7 +39,6 @@ class CompassSensor : public SensorBase {
char input_sysfs_path[PATH_MAX];
int input_sysfs_path_len;
- int setInitialState();
public:
CompassSensor();
diff --git a/aries/libsensors/Smb380Sensor.cpp b/aries/libsensors/Smb380Sensor.cpp
index 0d277b5..30a1660 100644
--- a/aries/libsensors/Smb380Sensor.cpp
+++ b/aries/libsensors/Smb380Sensor.cpp
@@ -62,31 +62,6 @@ Smb380Sensor::~Smb380Sensor() {
}
-int Smb380Sensor::setInitialState() {
-
- LOGD("Smb380Sensor::~setInitialState()");
- struct input_absinfo absinfo_x;
- struct input_absinfo absinfo_y;
- struct input_absinfo absinfo_z;
- float value;
- if (!ioctl(data_fd, EVIOCGABS(EVENT_TYPE_ACCEL_X), &absinfo_x) &&
- !ioctl(data_fd, EVIOCGABS(EVENT_TYPE_ACCEL_Y), &absinfo_y) &&
- !ioctl(data_fd, EVIOCGABS(EVENT_TYPE_ACCEL_Z), &absinfo_z)) {
- value = absinfo_x.value;
- mPendingEvent.acceleration.x = value * CONVERT_A_X;
- value = absinfo_y.value;
- mPendingEvent.acceleration.y = value * CONVERT_A_Y;
- value = absinfo_z.value;
- mPendingEvent.acceleration.z = value * CONVERT_A_Z;
- mHasPendingEvent = true;
- }
- else
- {
- LOGD("Smb380Sensor::~setInitialState() ioctl failed");
- }
- return 0;
-}
-
int Smb380Sensor::enable(int32_t, int en) {
@@ -111,7 +86,7 @@ int Smb380Sensor::enable(int32_t, int en) {
err = write(fd, buf, sizeof(buf));
close(fd);
mEnabled = flags;
- setInitialState();
+ //setInitialState();
return 0;
}
return -1;
diff --git a/aries/libsensors/Smb380Sensor.h b/aries/libsensors/Smb380Sensor.h
index 8490f24..5e55e9b 100644
--- a/aries/libsensors/Smb380Sensor.h
+++ b/aries/libsensors/Smb380Sensor.h
@@ -54,7 +54,6 @@ class Smb380Sensor : public SensorBase {
char input_sysfs_path[PATH_MAX];
int input_sysfs_path_len;
- int setInitialState();
public:
Smb380Sensor();