From: Lars-Peter Clausen <lars@metafoo.de>
To: Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: Add si7005 relative humidity and temperature sensor driver
Date: Fri, 10 Jan 2014 10:08:31 +0100 [thread overview]
Message-ID: <52CFB88F.20905@metafoo.de> (raw)
In-Reply-To: <1389215837-24060-1-git-send-email-pmeerw@pmeerw.net>
On 01/08/2014 10:17 PM, Peter Meerwald wrote:
> sensor provides 12-bit relative humidity and 14-bit temperature
> via I2C interface; temperature and linearity compensation is not
> implemented (yet)
>
> driver also supports the Si7015, but not the 2nd generation
> sensors Si7013/Si7020/Si7021
>
> datasheet is here
> http://www.silabs.com/Support%20Documents/TechnicalDocs/Si7005.pdf
>
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
One nitpick:
> + case IIO_CHAN_INFO_SCALE:
> + if (chan->type == IIO_TEMP) {
> + *val = 7; *val2 = 812500;
I can understand why you'd put this on one line, but its a bit confusing
this way when you read the code since two statements on one line is
unexpected. To quote CodingStyle: "Don't put multiple statements on a single
line unless you have something to hide".
> + } else {
> + *val = 3; *val2 = 906250;
> + }
> + return IIO_VAL_INT_PLUS_MICRO;
> +static int si7005_probe(struct i2c_client *client,
> + const struct i2c_device_id *id)
> +{
[...]
> + return iio_device_register(indio_dev);
Sachin will probably send a patch changing this to devm_iio_device_register ;)
prev parent reply other threads:[~2014-01-10 9:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 21:17 [PATCH] iio: Add si7005 relative humidity and temperature sensor driver Peter Meerwald
2014-01-10 9:08 ` Lars-Peter Clausen [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=52CFB88F.20905@metafoo.de \
--to=lars@metafoo.de \
--cc=linux-iio@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.