kernel_optimize_test/drivers/iio
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
..
accel iio: accel: bma180: Fix BMA25x bandwidth register values 2021-07-14 16:55:45 +02:00
adc iio: adc: ad7192: handle regulator voltage error first 2021-06-03 09:00:33 +02:00
afe
amplifiers
buffer
chemical
common iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-19 10:13:13 +02:00
dac iio: dac: ad5770r: Put fwnode in error case during ->probe() 2021-06-03 09:00:32 +02:00
dummy
frequency iio: frequency: adf4350: disable reg and clk on error in adf4350_probe() 2021-07-14 16:55:44 +02:00
gyro iio: gyro: fxas21002c: balance runtime power in error path 2021-06-03 09:00:32 +02:00
health
humidity iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-19 10:13:13 +02:00
imu iio: inv_mpu6050: Fully validate gyro and accel scale writes 2021-05-14 09:49:58 +02:00
light iio: ltr501: ltr501_read_ps(): add missing endianness conversion 2021-07-14 16:55:44 +02:00
magnetometer iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-19 10:13:13 +02:00
multiplexer
orientation iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-19 10:13:13 +02:00
position
potentiometer
potentiostat
pressure iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-19 10:13:13 +02:00
proximity iio: proximity: pulsedlight: Fix rumtime PM imbalance on error 2021-05-19 10:13:13 +02:00
resolver
temperature iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-19 10:13:13 +02:00
trigger
iio_core_trigger.h
iio_core.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c
Kconfig
Makefile
TODO