diff options
author | Christian Balster <christian.balster@gmail.com> | 2015-06-02 15:08:02 +0200 |
---|---|---|
committer | forkbomb <keepcalm444@gmail.com> | 2015-11-25 08:34:40 +1100 |
commit | f7d2dfda36dfb9e35914249ce62376c4fd2e8e32 (patch) | |
tree | dd7be090fa65485c8493e074905028a663055226 /libsensors/akm8975.c | |
parent | a0449080d1eedfd4980b28bd6e73b177ffd73728 (diff) | |
download | device_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/akm8975.c')
-rw-r--r-- | libsensors/akm8975.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/libsensors/akm8975.c b/libsensors/akm8975.c index ca85518..00f69ff 100644 --- a/libsensors/akm8975.c +++ b/libsensors/akm8975.c @@ -39,8 +39,6 @@ #define AKFS_PAT PAT3 struct akm8975_data { - struct smdk4x12_sensors_handlers *orientation_sensor; - AK8975PRMS akfs_params; sensors_vec_t magnetic; @@ -278,14 +276,6 @@ int akm8975_init(struct smdk4x12_sensors_handlers *handlers, data = (struct akm8975_data *) calloc(1, sizeof(struct akm8975_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/akm8975", O_RDONLY); if (device_fd < 0) { ALOGE("%s: Unable to open device", __func__); @@ -603,9 +593,6 @@ int akm8975_get_data(struct smdk4x12_sensors_handlers *handlers, } } while (input_event.type != EV_SYN); - if (data->orientation_sensor != NULL) - orientation_fill(data->orientation_sensor, NULL, &event->magnetic); - return 0; } |