summaryrefslogtreecommitdiff
path: root/driver/accel_kionix.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-03-13 09:54:26 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-03-15 17:58:02 -0700
commit9e95ac3e0aeeaa12aaca75bdb73a055ab969e310 (patch)
treeda1e21b39c9a1c52e72b422dbe9ba287c6163e84 /driver/accel_kionix.h
parent7ce651d4ca47eb5547c296d032d23f4f838fbecd (diff)
downloadchrome-ec-9e95ac3e0aeeaa12aaca75bdb73a055ab969e310.tar.gz
driver: kionix: Use base accelgyro structure
Unify get_range/get_datarate by using accelgyro_saved_data_t structure. BUG=none BRANCH=none TEST=compile Change-Id: I0bfa2f06c5dd2021a5af9e6499c97e65988167ce Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/961221 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/accel_kionix.h')
-rw-r--r--driver/accel_kionix.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/driver/accel_kionix.h b/driver/accel_kionix.h
index 79d6374917..b6dfa08b48 100644
--- a/driver/accel_kionix.h
+++ b/driver/accel_kionix.h
@@ -9,6 +9,7 @@
#define __CROS_EC_ACCEL_KIONIX_H
#include "common.h"
+#include "accelgyro.h"
#include "driver/accel_kx022.h"
#include "driver/accel_kxcj9.h"
@@ -22,11 +23,7 @@ struct accel_param_pair {
};
struct kionix_accel_data {
- /* Note, the following are indicies into their respective tables. */
- /* Current range of accelerometer. */
- int sensor_range;
- /* Current output data rate of accelerometer. */
- int sensor_datarate;
+ struct accelgyro_saved_data_t base;
/* Current resolution of accelerometer. */
int sensor_resolution;
int16_t offset[3];