linux/drivers/iio
Stephan Gerhold 4980301e1c 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>
[sudip: adjust context]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-28 13:31:02 +02:00
..
accel iio: accel: bma180: Fix BMA25x bandwidth register values 2021-07-28 13:31:02 +02:00
adc iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-07-14 16:53:43 +02:00
afe
amplifiers
buffer
chemical iio:chemical:ccs811: Fix timestamp alignment and prevent data leak. 2020-09-17 13:47:51 +02:00
common iio: cros_ec: Set Gyroscope default frequency to 25Hz 2020-09-17 13:47:49 +02:00
dac iio: ad5504: Fix setting power-down state 2021-01-27 11:47:48 +01:00
dummy
frequency
gyro iio: gyro: fxa21002c: Balance runtime pm + use pm_runtime_resume_and_get(). 2021-07-20 16:10:41 +02:00
health iio:health:afe4404 Fix timestamp alignment and prevent data leak. 2020-07-22 09:33:00 +02:00
humidity iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:53:38 +02:00
imu iio: adis16400: do not return ints in irq handlers 2021-07-14 16:53:37 +02:00
light iio: light: vcnl4035: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:53:45 +02:00
magnetometer iio: magn: bmc150: Balance runtime pm + use pm_runtime_resume_and_get() 2021-07-20 16:10:41 +02:00
multiplexer
orientation
potentiometer
potentiostat iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-07-14 16:53:39 +02:00
pressure iio:pressure:mpl3115: Force alignment of buffer 2020-12-30 11:51:44 +01:00
proximity iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:53:45 +02:00
resolver
temperature iio: hid-sensor-temperature: Fix issues of timestamp channel 2021-03-24 11:26:43 +01:00
trigger iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context 2020-12-30 11:51:17 +01:00
Kconfig
Makefile
iio_core.h
iio_core_trigger.h
industrialio-buffer.c iio: buffer: Fix demux update 2020-12-30 11:51:44 +01:00
industrialio-configfs.c
industrialio-core.c iio: core: add missing IIO_MOD_H2/ETHANOL string identifiers 2020-07-22 09:32:54 +02:00
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c