summaryrefslogtreecommitdiffstats
path: root/libsensors/lsm330dlc_acceleration.c
diff options
context:
space:
mode:
authorChristian Balster <christian.balster@gmail.com>2015-06-02 15:08:02 +0200
committerforkbomb <keepcalm444@gmail.com>2015-11-25 08:34:40 +1100
commitf7d2dfda36dfb9e35914249ce62376c4fd2e8e32 (patch)
treedd7be090fa65485c8493e074905028a663055226 /libsensors/lsm330dlc_acceleration.c
parenta0449080d1eedfd4980b28bd6e73b177ffd73728 (diff)
downloaddevice_samsung_i9300-f7d2dfda36dfb9e35914249ce62376c4fd2e8e32.zip
device_samsung_i9300-f7d2dfda36dfb9e35914249ce62376c4fd2e8e32.tar.gz
device_samsung_i9300-f7d2dfda36dfb9e35914249ce62376c4fd2e8e32.tar.bz2
i9300: libsensors: remove unused orientation sensor
The Orientation Sensor is deprecated and no longer required. Additionally this implementation is never even used, since Android automatically replaces it by it's own implementation if the sensor HAL doesn't also provide a Rotation Vector sensor. Furthermore the current implementation only uses the accelerometer and magnetometer for the sensor fusion and doesn't make use of the Gyroscope. So should we at some point decide to implement our own complete sensor fusion this would have to be rewritten anyway. Change-Id: I45d8a9afd2089b49131e6cc69cdf2f3dfee46c92
Diffstat (limited to 'libsensors/lsm330dlc_acceleration.c')
-rw-r--r--libsensors/lsm330dlc_acceleration.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/libsensors/lsm330dlc_acceleration.c b/libsensors/lsm330dlc_acceleration.c
index 5782d57..cd22cdf 100644
--- a/libsensors/lsm330dlc_acceleration.c
+++ b/libsensors/lsm330dlc_acceleration.c
@@ -31,8 +31,6 @@
#include "lsm330dlc_accel.h"
struct lsm330dlc_acceleration_data {
- struct smdk4x12_sensors_handlers *orientation_sensor;
-
long int delay;
int device_fd;
int uinput_fd;
@@ -130,14 +128,6 @@ int lsm330dlc_acceleration_init(struct smdk4x12_sensors_handlers *handlers,
data = (struct lsm330dlc_acceleration_data *) calloc(1, sizeof(struct lsm330dlc_acceleration_data));
- for (i = 0; i < device->handlers_count; i++) {
- if (device->handlers[i] == NULL)
- continue;
-
- if (device->handlers[i]->handle == SENSOR_TYPE_ORIENTATION)
- data->orientation_sensor = device->handlers[i];
- }
-
device_fd = open("/dev/accelerometer", O_RDONLY);
if (device_fd < 0) {
ALOGE("%s: Unable to open device", __func__);
@@ -381,9 +371,6 @@ int lsm330dlc_acceleration_get_data(struct smdk4x12_sensors_handlers *handlers,
}
} while (input_event.type != EV_SYN);
- if (data->orientation_sensor != NULL)
- orientation_fill(data->orientation_sensor, &event->acceleration, NULL);
-
return 0;
}