diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2018-11-30 17:06:39 -0800 |
---|---|---|
committer | Justin TerAvest <teravest@chromium.org> | 2019-02-08 21:38:48 +0000 |
commit | 30dd007291e625fe42897d2f2f2f5bd3d2569900 (patch) | |
tree | e0f8731d67dd572090eaf5a46255a1d976dae6e0 /driver/sensorhub_lsm6dsm.h | |
parent | 6776b585f17b1112b80086f8623eeb37d303747f (diff) | |
download | chrome-ec-30dd007291e625fe42897d2f2f2f5bd3d2569900.tar.gz |
driver: lsm6dsm: Integrate LIS2MDL behind LSM6DSM
- Cros set_rate and normalize between LIS2MDL and LSM6DSM
- Remove unused sensor hub function.
- Remove parent field, use macro instead (magnetometer is just after the
gyroscope).
BUG=b:110143516,b:115587004
BRANCH=none
TEST=On meep, check the magnetometer is returning data with shell/python
script.
Check calibration quick in.
Check with AIDA64, compass and sensor app the magnetometer is seen.
Change-Id: I2efef99eda095e33b6a0555b1cbc4ac8fdbfab5d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1361992
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Trybot-Ready: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'driver/sensorhub_lsm6dsm.h')
-rw-r--r-- | driver/sensorhub_lsm6dsm.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/driver/sensorhub_lsm6dsm.h b/driver/sensorhub_lsm6dsm.h index 6bb318e281..a86ca6f9c3 100644 --- a/driver/sensorhub_lsm6dsm.h +++ b/driver/sensorhub_lsm6dsm.h @@ -15,21 +15,6 @@ #include "motion_sense.h" /** - * Set the output data rate of the external sensor that is attached - * to the sensor hub to the requested rate. - * - * @param s Pointer to external motion sensor's data structure. - * @param rate Preferred output data rate from the sensor. - * @param rnd Flag to indicate rounding to the nearest supported - * output data rate by the sensor. - * @param ret_rate Rate configured by the sensor hub depending on the - * accelerometer data rate. - * @return EC_SUCCESS on success, EC error codes on failure. - */ -int sensorhub_set_ext_data_rate(const struct motion_sensor_t *s, - int rate, int rnd, int *ret_rate); - -/** * Configure the register of an external sensor that is attached to sensor * hub with a specific value. * @@ -60,10 +45,10 @@ int sensorhub_config_slv0_read(const struct motion_sensor_t *s, * of the sensor hub. * * @param s Pointer to external motion sensor's data structure. - * @param v Vector to hold the data from the external sensor. + * @param raw Vector to hold the data from the external sensor. * @return EC_SUCCESS on success, EC error codes on failure. */ -int sensorhub_slv0_data_read(const struct motion_sensor_t *s, intv3_t v); +int sensorhub_slv0_data_read(const struct motion_sensor_t *s, uint8_t *raw); /** * Check the identity of the external sensor and then reset the external |