[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEnQRZAfZZFN7TLMfa_MNOM4JEVgDoNnTRMi-ff_O4V-C1o22Q@mail.gmail.com>
Date: Sun, 8 Mar 2015 21:11:07 +0200
From: Daniel Baluta <daniel.baluta@...il.com>
To: Tomasz Duszynski <tduszyns@...il.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald <pmeerw@...erw.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>
Subject: Re: [PATCH] iio: pressure: add support for MS5611 pressure and
temperature sensor
Hi Tomasz,
On Sun, Mar 8, 2015 at 7:29 PM, Tomasz Duszynski <tduszyns@...il.com> wrote:
> Add support for Measurement Specialities MS5611 pressure
> and temperature sensor.
>
> Signed-off-by: Tomasz Duszynski <tduszyns@...il.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@...il.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.
> + */
> +#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?
thanks,
Daniel.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists