From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Stephan Gerhold <stephan@gerhold.net>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 1/2] iio: accel: bma180: Fix BMA25x bandwidth register values
Date: Thu, 3 Jun 2021 18:12:08 +0100 [thread overview]
Message-ID: <20210603181208.6fd7b6a3@jic23-huawei> (raw)
In-Reply-To: <CACRpkdZweO5kCdSky8Nc+QmKWRuGLKX4QEct5LmH4RTPirRLhg@mail.gmail.com>
On Wed, 26 May 2021 14:12:02 +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] 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>
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Fixes: 2017cff24cc0 ("iio:bma180: Add BMA250 chip support")
> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
>
> Good catch!
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Applied to the fixes-togreg branch of iio.git and marked for stable.
I think I can probably get away with picking up patch 2 into the togreg branch
without anything blowing up during the merge.
Thanks,
Jonathan
>
> > After spending some more time with the driver I noticed that BMA253/BMA254
> > would actually be better supported by the bmc150-accel driver (which
> > doesn't have this problem and also supports the motion trigger/interrupt).
> >
> > I'm preparing a separate patch set to move BMA254 to bmc150-accel at least,
> > but I'm not sure about BMA250 so this patch is relevant anyway. And I had
> > it almost done already, so I thought it's better to send it. :)
>
> I looked at the preliminary patches and this looks really good
> too.
>
> Yours,
> Linus Walleij
next prev parent reply other threads:[~2021-06-03 17:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 9:44 [PATCH 0/2] iio: accel: bma180: Fix BMA25x bandwidth selection Stephan Gerhold
2021-05-26 9:44 ` [PATCH 1/2] iio: accel: bma180: Fix BMA25x bandwidth register values Stephan Gerhold
2021-05-26 12:12 ` Linus Walleij
2021-06-03 17:12 ` Jonathan Cameron [this message]
2021-06-11 18:14 ` Jonathan Cameron
2021-05-26 9:44 ` [PATCH 2/2] iio: accel: bma180: Add missing 500 Hz / 1000 Hz bandwidth Stephan Gerhold
2021-05-26 12:12 ` Linus Walleij
2021-06-03 17:13 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210603181208.6fd7b6a3@jic23-huawei \
--to=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=stephan@gerhold.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox