linux/drivers/iio/accel
Stephan Gerhold 8090d67421 iio: accel: bma180: Fix BMA25x bandwidth register values
According to the BMA253 datasheet [1] and BMA250 datasheet [2] the
bandwidth value for BMA25x should be set as 01xxx:

  "Settings 00xxx result in a bandwidth of 7.81 Hz; [...]
   It is recommended [...] to use the range from ´01000b´ to ´01111b´
   only in order to be compatible with future products."

However, at the moment the drivers sets bandwidth values from 0 to 6,
which is not recommended and always results into 7.81 Hz bandwidth
according to the datasheet.

Fix this by introducing a bw_offset = 8 = 01000b for BMA25x,
so the additional bit is always set for BMA25x.

[1]: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bma253-ds000.pdf
[2]: https://datasheet.octopart.com/BMA250-Bosch-datasheet-15540103.pdf

Cc: Peter Meerwald <pmeerw@pmeerw.net>
Fixes: 2017cff24c ("iio:bma180: Add BMA250 chip support")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210526094408.34298-2-stephan@gerhold.net
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-06-13 17:00:17 +01:00
..
adis16201.c iio: adis: Cleanout unused headers 2021-06-04 09:28:10 +01:00
adis16209.c iio: adis: Cleanout unused headers 2021-06-04 09:28:10 +01:00
adxl345_core.c Replace HTTP links with HTTPS ones: drivers/iio 2020-07-13 15:05:59 +01:00
adxl345_i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
adxl345_spi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
adxl345.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
adxl372_i2c.c iio: adxl372_i2c: Add OF device ID table 2020-08-22 10:53:16 +01:00
adxl372_spi.c iio: adxl372_spi: change indentation for of_table 2020-08-22 10:53:15 +01:00
adxl372.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
adxl372.h
bma180.c iio: accel: bma180: Fix BMA25x bandwidth register values 2021-06-13 17:00:17 +01:00
bma220_spi.c iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-05-17 13:54:28 +01:00
bma400_core.c iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
bma400_i2c.c iio: accel: Add driver for the BMA400 2019-12-29 15:20:02 +00:00
bma400_spi.c iio: accel: bma400: add support for bma400 spi 2020-06-14 11:49:16 +01:00
bma400.h iio: accel: bma400: basic regulator support 2019-12-29 15:20:02 +00:00
bmc150-accel-core.c iio: accel: bmc150: Set label based on accel-location for ACPI DUAL250E fwnodes 2021-06-09 20:54:05 +01:00
bmc150-accel-i2c.c iio: accel: bmc150: Add support for DUAL250E ACPI DSM for setting the hinge angle 2021-06-09 20:53:15 +01:00
bmc150-accel-spi.c iio: accel: bmc150-accel: Add support for BMA222 2020-12-03 19:32:41 +00:00
bmc150-accel.h iio: accel: bmc150: Add support for DUAL250E ACPI DSM for setting the hinge angle 2021-06-09 20:53:15 +01:00
bmi088-accel-core.c iio: accel: bmi088: Balance runtime pm + use pm_runtime_resume_and_get() 2021-05-17 13:54:27 +01:00
bmi088-accel-spi.c iio: accel: Add support for the Bosch-Sensortec BMI088 2021-03-11 20:46:58 +00:00
bmi088-accel.h iio: accel: Add support for the Bosch-Sensortec BMI088 2021-03-11 20:46:58 +00:00
cros_ec_accel_legacy.c iio: cros: unify hw fifo attributes without API changes 2021-03-25 19:13:52 +00:00
da280.c iio: Remove kernel-doc keyword in file header comment 2021-03-25 19:13:49 +00:00
da311.c iio: Remove kernel-doc keyword in file header comment 2021-03-25 19:13:49 +00:00
dmard06.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
dmard09.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
dmard10.c iio: Remove kernel-doc keyword in file header comment 2021-03-25 19:13:49 +00:00
fxls8962af-core.c iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
fxls8962af-i2c.c iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers 2021-05-17 13:54:23 +01:00
fxls8962af-spi.c iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers 2021-05-17 13:54:23 +01:00
fxls8962af.h iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers 2021-05-17 13:54:23 +01:00
hid-sensor-accel-3d.c iio: accel: hid: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-05-17 13:54:28 +01:00
Kconfig iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers 2021-05-17 13:54:23 +01:00
kxcjk-1013.c iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
kxsd9-i2c.c iio: accel: kxsd9-i2c: Use mod_devicetable.h and drop of_match_ptr macro 2020-04-25 15:31:34 +01:00
kxsd9-spi.c Merge 5.2-rc3 into staging-next 2019-06-03 07:27:16 +02:00
kxsd9.c iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
kxsd9.h
Makefile iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers 2021-05-17 13:54:23 +01:00
mc3230.c iio: Remove kernel-doc keyword in file header comment 2021-03-25 19:13:49 +00:00
mma7455_core.c iio:accel:mma7455: Fix timestamp alignment and prevent data leak. 2020-08-22 11:38:52 +01:00
mma7455_i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mma7455_spi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mma7455.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mma7660.c iio: Remove kernel-doc keyword in file header comment 2021-03-25 19:13:49 +00:00
mma8452.c iio: accel: mma8452: Balance runtime pm + use pm_runtime_resume_and_get() 2021-05-17 13:54:27 +01:00
mma9551_core.c iio: accel: mma9551/3: Balance untime pm + use pm_runtime_resume_and_get() 2021-05-17 13:54:25 +01:00
mma9551_core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
mma9551.c iio: accel: mma9551/3: Balance untime pm + use pm_runtime_resume_and_get() 2021-05-17 13:54:25 +01:00
mma9553.c iio: accel: mma9551/3: Balance untime pm + use pm_runtime_resume_and_get() 2021-05-17 13:54:25 +01:00
mxc4005.c iio: accel: mxc4005: Fix overread of data and alignment issue. 2021-05-17 13:54:28 +01:00
mxc6255.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
sca3000.c iio: accel: sca3000: kernel-doc fixes. Missing - and wrong function names. 2021-03-25 19:13:51 +00:00
sca3300.c iio: accel: Add driver for Murata SCA3300 accelerometer 2021-05-17 13:49:09 +01:00
ssp_accel_sensor.c iio: make use of devm_iio_kfifo_buffer_setup() helper 2021-03-11 20:47:01 +00:00
st_accel_buffer.c iio: Move attach/detach of the poll func to the core 2020-06-20 17:34:44 +01:00
st_accel_core.c iio: accel: st_sensors: Stop copying channels 2021-06-03 18:24:13 +01:00
st_accel_i2c.c iio: st_sensors: Call st_sensors_power_enable() from bus drivers 2021-05-17 13:54:22 +01:00
st_accel_spi.c iio: st_sensors: Call st_sensors_power_enable() from bus drivers 2021-05-17 13:54:22 +01:00
st_accel.h iio: st_sensors: Make accel, gyro, magn and pressure probe shared 2021-05-17 13:54:22 +01:00
stk8ba50.c iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-05-17 13:54:28 +01:00
stk8312.c iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-05-17 13:54:28 +01:00