kernel_optimize_test/drivers/iio/accel
Stephan Gerhold 8c90ec9965 iio: accel: bma180: Fix BMA25x bandwidth register values
commit 8090d67421ddab0ae932abab5a60200598bf0bbb upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-14 16:55:45 +02:00
..
adis16201.c
adis16209.c
adxl345_core.c
adxl345_i2c.c
adxl345_spi.c
adxl345.h
adxl372_i2c.c
adxl372_spi.c
adxl372.c
adxl372.h
bma180.c
bma220_spi.c
bma400_core.c
bma400_i2c.c
bma400_spi.c
bma400.h
bmc150-accel-core.c
bmc150-accel-i2c.c
bmc150-accel-spi.c
bmc150-accel.h
cros_ec_accel_legacy.c
da280.c
da311.c
dmard06.c
dmard09.c
dmard10.c
hid-sensor-accel-3d.c
Kconfig
kxcjk-1013.c
kxsd9-i2c.c
kxsd9-spi.c
kxsd9.c
kxsd9.h
Makefile
mc3230.c
mma7455_core.c
mma7455_i2c.c
mma7455_spi.c
mma7455.h
mma7660.c
mma8452.c
mma9551_core.c
mma9551_core.h
mma9551.c
mma9553.c
mxc4005.c
mxc6255.c
sca3000.c
ssp_accel_sensor.c
st_accel_buffer.c
st_accel_core.c
st_accel_i2c.c
st_accel_spi.c
st_accel.h
stk8ba50.c
stk8312.c