From: Jonathan Cameron <jic23@cam.ac.uk>
To: Michael.Hennerich@analog.com
Cc: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@cam.ac.uk>
Subject: [PATCH 01/16] staging:iio:adc:ad799x fix incorrect scan_type descriptions.
Date: Fri, 23 Sep 2011 13:01:27 +0100 [thread overview]
Message-ID: <1316779302-12357-2-git-send-email-jic23@cam.ac.uk> (raw)
In-Reply-To: <1316779302-12357-1-git-send-email-jic23@cam.ac.uk>
A few of these had the wrong shifts, which would lead to
userspace hacking off the top couple of bits. Also, one
part had the wrong accuracy.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
---
drivers/staging/iio/adc/ad799x_core.c | 40 ++++++++++++++++----------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c
index b6662db..58f70aa 100644
--- a/drivers/staging/iio/adc/ad799x_core.c
+++ b/drivers/staging/iio/adc/ad799x_core.c
@@ -506,16 +506,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[ad7995] = {
.channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 0, 0, IIO_ST('u', 10, 16, 0), 0),
+ 0, 0, IIO_ST('u', 10, 16, 2), 0),
.channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 1, 1, IIO_ST('u', 10, 16, 0), 0),
+ 1, 1, IIO_ST('u', 10, 16, 2), 0),
.channel[2] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 2, 2, IIO_ST('u', 10, 16, 0), 0),
+ 2, 2, IIO_ST('u', 10, 16, 2), 0),
.channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 3, 3, IIO_ST('u', 10, 16, 0), 0),
+ 3, 3, IIO_ST('u', 10, 16, 2), 0),
.channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
.num_channels = 5,
.int_vref_mv = 1024,
@@ -524,16 +524,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[ad7999] = {
.channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 0, 0, IIO_ST('u', 10, 16, 0), 0),
+ 0, 0, IIO_ST('u', 8, 16, 4), 0),
.channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 1, 1, IIO_ST('u', 10, 16, 0), 0),
+ 1, 1, IIO_ST('u', 8, 16, 4), 0),
.channel[2] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 2, 2, IIO_ST('u', 10, 16, 0), 0),
+ 2, 2, IIO_ST('u', 8, 16, 4), 0),
.channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 3, 3, IIO_ST('u', 10, 16, 0), 0),
+ 3, 3, IIO_ST('u', 8, 16, 4), 0),
.channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
.num_channels = 5,
.int_vref_mv = 1024,
@@ -555,16 +555,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[ad7993] = {
.channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 0, 0, IIO_ST('u', 10, 16, 0), 0),
+ 0, 0, IIO_ST('u', 10, 16, 2), 0),
.channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 1, 1, IIO_ST('u', 10, 16, 0), 0),
+ 1, 1, IIO_ST('u', 10, 16, 2), 0),
.channel[2] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 2, 2, IIO_ST('u', 10, 16, 0), 0),
+ 2, 2, IIO_ST('u', 10, 16, 2), 0),
.channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 3, 3, IIO_ST('u', 10, 16, 0), 0),
+ 3, 3, IIO_ST('u', 10, 16, 2), 0),
.channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
.num_channels = 5,
.int_vref_mv = 1024,
@@ -593,28 +593,28 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[ad7997] = {
.channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 0, 0, IIO_ST('u', 10, 16, 0), 0),
+ 0, 0, IIO_ST('u', 10, 16, 2), 0),
.channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 1, 1, IIO_ST('u', 10, 16, 0), 0),
+ 1, 1, IIO_ST('u', 10, 16, 2), 0),
.channel[2] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 2, 2, IIO_ST('u', 10, 16, 0), 0),
+ 2, 2, IIO_ST('u', 10, 16, 2), 0),
.channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 3, 3, IIO_ST('u', 10, 16, 0), 0),
+ 3, 3, IIO_ST('u', 10, 16, 2), 0),
.channel[4] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 4, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 4, 4, IIO_ST('u', 10, 16, 0), 0),
+ 4, 4, IIO_ST('u', 10, 16, 2), 0),
.channel[5] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 5, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 5, 5, IIO_ST('u', 10, 16, 0), 0),
+ 5, 5, IIO_ST('u', 10, 16, 2), 0),
.channel[6] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 6, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 6, 6, IIO_ST('u', 10, 16, 0), 0),
+ 6, 6, IIO_ST('u', 10, 16, 2), 0),
.channel[7] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 7, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
- 7, 7, IIO_ST('u', 10, 16, 0), 0),
+ 7, 7, IIO_ST('u', 10, 16, 2), 0),
.channel[8] = IIO_CHAN_SOFT_TIMESTAMP(8),
.num_channels = 9,
.int_vref_mv = 1024,
--
1.7.3.4
next prev parent reply other threads:[~2011-09-23 11:53 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 12:01 [PATCH 00/16] staging:iio:adc cleanups / fixes Jonathan Cameron
2011-09-23 12:01 ` Jonathan Cameron [this message]
2011-09-23 12:01 ` [PATCH 02/16] staging:iio:adc:ad799x stop using IIO_CHAN macro Jonathan Cameron
2011-09-26 7:40 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 03/16] staging:iio:adc:ad799x fix incorrect setting of configuration register on single channel read Jonathan Cameron
2011-09-26 7:24 ` Hennerich, Michael
2011-09-26 8:31 ` Jonathan Cameron
2011-09-23 12:01 ` [PATCH 04/16] staging:iio:adc:ad799x trivial: use the convenient chan struct Jonathan Cameron
2011-09-26 7:32 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 05/16] staging:iio:adc:ad799x use a table for frequency values rather than big switch Jonathan Cameron
2011-09-26 7:25 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 06/16] staging:iio:adc:ad799x avoid bouncing back and forth from iio_priv space Jonathan Cameron
2011-09-26 7:29 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 07/16] staging:iio:adc:ad799x use the core handling for as much of the events as possible Jonathan Cameron
2011-09-26 7:51 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 08/16] staging:iio:adc:ad799x set the device name only once Jonathan Cameron
2011-09-26 7:25 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 09/16] staging:iio:adc:ad799x address and scan_index always match so stop using address Jonathan Cameron
2011-09-26 7:32 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 10/16] staging:iio:adc:ad7606 add local define for chan_spec structures Jonathan Cameron
2011-09-26 7:40 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 11/16] staging:iio:adc:ad7606 trivial code style fix Jonathan Cameron
2011-09-26 7:33 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 12/16] staging:iio:adc:ad7606 make gpio request failures more consistent Jonathan Cameron
2011-09-26 7:37 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 13/16] staging;iio:adc:ad7606 use iio_sw_buffer_preenable rather than local equiv Jonathan Cameron
2011-09-26 7:42 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 14/16] staging:iio:adc:ad7606 refactor to remove st->irq and st->id Jonathan Cameron
2011-09-26 7:38 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 15/16] staging:iio:adc:ad7606 remove unused chip info elements Jonathan Cameron
2011-09-26 7:40 ` Hennerich, Michael
2011-09-23 12:01 ` [PATCH 16/16] staging:iio:adc:ad7887 stop using IIO_CHAN macro Jonathan Cameron
2011-09-26 7:39 ` Hennerich, Michael
2011-09-26 7:55 ` [PATCH 00/16] staging:iio:adc cleanups / fixes Hennerich, Michael
2011-09-26 8:34 ` Jonathan Cameron
2011-09-27 6:17 ` Hennerich, Michael
2011-09-27 8:58 ` 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=1316779302-12357-2-git-send-email-jic23@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=Michael.Hennerich@analog.com \
--cc=linux-iio@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).