Message ID | 20210526094408.34298-3-stephan@gerhold.net (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | iio: accel: bma180: Fix BMA25x bandwidth selection | expand |
On Wed, May 26, 2021 at 11:44 AM Stephan Gerhold <stephan@gerhold.net> wrote: > According to the BMA253 datasheet [1] and BMA250 datasheet [2] BMA25x > also supports a bandwidth of 500 Hz and 1000 Hz but this was not listed > in the driver for some reason. > > Add it to the bw_table to make the driver match the datasheet. > > [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> > Cc: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Wed, 26 May 2021 14:12:44 +0200 Linus Walleij <linus.walleij@linaro.org> wrote: > On Wed, May 26, 2021 at 11:44 AM Stephan Gerhold <stephan@gerhold.net> wrote: > > > According to the BMA253 datasheet [1] and BMA250 datasheet [2] BMA25x > > also supports a bandwidth of 500 Hz and 1000 Hz but this was not listed > > in the driver for some reason. > > > > Add it to the bw_table to make the driver match the datasheet. > > > > [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> > > Cc: Linus Walleij <linus.walleij@linaro.org> > > Signed-off-by: Stephan Gerhold <stephan@gerhold.net> > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Applied to the togreg branch of iio.git and pushed out as testing for 0-day and any friends to play with. Thanks, Jonathan > > Yours, > Linus Walleij
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 81d1e070a2ee..e7c6b3096cb7 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -184,7 +184,7 @@ static int bma023_scale_table[] = { 2452, 4903, 9709, }; static int bma180_bw_table[] = { 10, 20, 40, 75, 150, 300 }; /* Hz */ static int bma180_scale_table[] = { 1275, 1863, 2452, 3727, 4903, 9709, 19417 }; -static int bma25x_bw_table[] = { 8, 16, 31, 63, 125, 250 }; /* Hz */ +static int bma25x_bw_table[] = { 8, 16, 31, 63, 125, 250, 500, 1000 }; /* Hz */ static int bma25x_scale_table[] = { 0, 0, 0, 38344, 0, 76590, 0, 0, 153180, 0, 0, 0, 306458 };
According to the BMA253 datasheet [1] and BMA250 datasheet [2] BMA25x also supports a bandwidth of 500 Hz and 1000 Hz but this was not listed in the driver for some reason. Add it to the bw_table to make the driver match the datasheet. [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> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephan Gerhold <stephan@gerhold.net> --- drivers/iio/accel/bma180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)