From: tduszyns@gmail.com
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Tomasz Duszynski <tduszyns@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: pressure: add support for MS5611 pressure and temperature sensor
Date: Mon, 9 Mar 2015 20:00:57 +0100 [thread overview]
Message-ID: <20150309190057.GB598@Arch.lan> (raw)
In-Reply-To: <CAEnQRZAfZZFN7TLMfa_MNOM4JEVgDoNnTRMi-ff_O4V-C1o22Q@mail.gmail.com>
On Sun, Mar 08, 2015 at 09:11:07PM +0200, Daniel Baluta wrote:
> Hi Tomasz,
>
> On Sun, Mar 8, 2015 at 7:29 PM, Tomasz Duszynski <tduszyns@gmail.com> wrote:
> > Add support for Measurement Specialities MS5611 pressure
> > and temperature sensor.
> >
> > Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
>
> <snip>
>
> > +++ b/drivers/iio/pressure/ms5611_i2c.c
> > @@ -0,0 +1,131 @@
> > +/*
> > + * MS5611 pressure and temperature sensor driver (I2C bus)
> > + *
> > + * Copyright (c) Tomasz Duszynski <tduszyns@gmail.com>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
>
> If fixed, please specify here the I2C slave address.
OK
>
> > + */
> > +#include <linux/delay.h>
>
> <snip>
>
> > +static int ms5611_read_adc(struct ms5611_state *st, s32 *val)
> > +{
> > + int ret;
> > + u8 buf[3];
> > +
> > + ret = i2c_smbus_read_i2c_block_data(st->client, MS5611_READ_ADC,
> > + 3, buf);
> > + if (ret < 0)
> > + return ret;
> > +
> > + *val = (buf[0] << 16) | (buf[1] << 8) | buf[0];
>
> Hmm, buf[2] is not used. Is this intended or the formula
> has buf[2] as the last OR factor?
You're right. Last factor should be buf[2].
>
> thanks,
> Daniel.
Thanks for review!
prev parent reply other threads:[~2015-03-09 19:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 17:29 [PATCH] iio: pressure: add support for MS5611 pressure and temperature sensor Tomasz Duszynski
2015-03-08 18:16 ` Peter Meerwald
2015-03-09 18:56 ` tduszyns
2015-03-08 19:11 ` Daniel Baluta
2015-03-09 19:00 ` tduszyns [this message]
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=20150309190057.GB598@Arch.lan \
--to=tduszyns@gmail.com \
--cc=daniel.baluta@gmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.