diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-01-09 10:19:59 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-24 05:32:27 +0000 |
commit | e5320809ae393184f8ff3c120232f42fe714f616 (patch) | |
tree | 888de2420e993b9458e2bad55eac53c970b6fc60 /driver/mag_lis2mdl.h | |
parent | 4ae4aa94365e6e93654c4a7191ec9a9f65409dc3 (diff) | |
download | chrome-ec-e5320809ae393184f8ff3c120232f42fe714f616.tar.gz |
driver: lis2mdl: Define LIS2MDL_CAL even when CONFIG_MAG_CALIBRATE is not
mag_cal_t holds offset information for the sensor, even when online
calibration is not defined.
Allow driver to work with online calibration disabled (it could be set
from the host).
BUG=none
BRANCH=none
TEST=using nucleo-f072rb_iks01a2, check magnetometer is working with or
without CONFIG_MAG_CALIBRATE enabled.
Change-Id: I2e259f53c620c593b516a12d6dff47dfbadb26c8
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1993584
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'driver/mag_lis2mdl.h')
-rw-r--r-- | driver/mag_lis2mdl.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/driver/mag_lis2mdl.h b/driver/mag_lis2mdl.h index 6be0d70e54..fb50b9712a 100644 --- a/driver/mag_lis2mdl.h +++ b/driver/mag_lis2mdl.h @@ -71,11 +71,9 @@ struct lis2mdl_private_data { #ifndef CONFIG_LSM6DSM_SEC_I2C #define LIS2MDL_ST_DATA(g) (&((g).data)) -#ifdef CONFIG_MAG_CALIBRATE #define LIS2MDL_CAL(_s) \ (&(DOWNCAST(s->drv_data, struct lis2mdl_private_data, data)->cal)) #endif -#endif #define LIS2MDL_ODR_MIN_VAL 10000 |