From: Jonathan Cameron <jic23@kernel.org>
To: Angel Iglesias <ang.iglesiasg@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Paul Cercueil <paul@crapouillou.net>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: pressure: bmp280: Add support for BMP380 sensor family
Date: Sat, 16 Jul 2022 17:03:44 +0100 [thread overview]
Message-ID: <20220716170344.0470eaae@jic23-huawei> (raw)
In-Reply-To: <2d8bbc776ef21a90576b6201cd84736f00c67957.camel@gmail.com>
On Mon, 27 Jun 2022 17:42:49 +0200
Angel Iglesias <ang.iglesiasg@gmail.com> wrote:
> On sáb, 2022-06-25 at 16:46 +0100, Jonathan Cameron wrote:
> > On Sat, 25 Jun 2022 17:09:12 +0200
> > Angel Iglesias <ang.iglesiasg@gmail.com> wrote:
> >
> > > Adds compatibility with the new generation of this sensor, the
> > > BMP380
> > >
> > > Included basic sensor initialization to do pressure and temp
> > > measurements and allows tuning oversampling settings for each
> > > channel
> > > The compensation algorithms are adapted from the device datasheet
> > > and
> > > the repository https://github.com/BoschSensortec/BMP3-Sensor-API
> > >
> > > Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
> >
> > Hi Angel,
> >
> > A few comments inline, but mostly looks good to me.
First a process comment. Cut out anything you agree with.
Too many emails to read so focus on the bits where there are questions
or they will get missed. Reviewers are happy to assume you agree
with them if you don't say otherwise :)
> >
> > Jonathan
...
>
> > > +
> > > +#define BMP380_FILTER_MASK GENMASK(3, 1)
> > > +#define BMP380_FILTER_OFF 0
> > > +#define BMP380_FILTER_1X BIT(1)
> > > +#define BMP380_FILTER_3X BIT(2)
> > > +#define BMP380_FILTER_7X (BIT(2) | BIT(1))
> > > +#define BMP380_FILTER_15X BIT(3)
> > > +#define BMP380_FILTER_31X (BIT(3) | BIT(1))
> > > +#define BMP380_FILTER_63X (BIT(3) | BIT(2))
> > > +#define BMP380_FILTER_127X (BIT(3) | BIT(2) | BIT(1))
> >
> > these are values, 0,1,2,3,4,5,6,7 not a bunch of bits.
> > So use with FIELD_PREP()
>
> Should I convert the values to a enumeration or simply declare the
> macros with the values? Thanks in advance
Slight preference for defines with the values.
J
next prev parent reply other threads:[~2022-07-16 15:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-25 15:09 [PATCH 2/3] iio: pressure: bmp280: Add support for BMP380 sensor family Angel Iglesias
2022-06-25 15:46 ` Jonathan Cameron
2022-06-27 15:42 ` Angel Iglesias
2022-07-16 16:03 ` Jonathan Cameron [this message]
2022-06-25 16:49 ` kernel test robot
2022-06-25 17:59 ` kernel test robot
2022-06-25 20:11 ` kernel test robot
2022-06-25 20:11 ` kernel test robot
2022-06-26 1:24 ` kernel test robot
2022-06-27 7:37 ` Dan Carpenter
2022-06-27 14:48 ` Angel Iglesias
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=20220716170344.0470eaae@jic23-huawei \
--to=jic23@kernel.org \
--cc=ang.iglesiasg@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@crapouillou.net \
--cc=rafael.j.wysocki@intel.com \
--cc=ulf.hansson@linaro.org \
/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