From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 1/5] iio: adis16400: Report pressure channel scale
Date: Fri, 15 May 2015 17:18:34 +0200 [thread overview]
Message-ID: <1431703118-32676-2-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1431703118-32676-1-git-send-email-lars@metafoo.de>
Add the scale for the pressure channel, which is currently missing.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Fixes: 76ada52f7f5d ("iio:adis16400: Add support for the adis16448")
---
drivers/iio/imu/adis16400_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index fa795dc..8de6427 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -405,6 +405,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
*val = st->variant->temp_scale_nano / 1000000;
*val2 = (st->variant->temp_scale_nano % 1000000);
return IIO_VAL_INT_PLUS_MICRO;
+ case IIO_PRESSURE:
+ /* 20 uBar = 0.002kPascal */
+ *val = 0;
+ *val2 = 2000;
+ return IIO_VAL_INT_PLUS_MICRO;
default:
return -EINVAL;
}
--
1.8.0
next prev parent reply other threads:[~2015-05-15 15:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 15:18 [PATCH 0/5] iio: adis16400 fixes Lars-Peter Clausen
2015-05-15 15:18 ` Lars-Peter Clausen [this message]
2015-05-16 9:56 ` [PATCH 1/5] iio: adis16400: Report pressure channel scale Jonathan Cameron
2015-05-15 15:18 ` [PATCH 2/5] iio: adis16400: Use != channel indices for the two voltage channels Lars-Peter Clausen
2015-05-16 9:57 ` Jonathan Cameron
2015-05-15 15:18 ` [PATCH 3/5] iio: adis16400: Compute the scan mask from channel indices Lars-Peter Clausen
2015-05-16 9:59 ` Jonathan Cameron
2015-05-15 15:18 ` [PATCH 4/5] iio: adis16400: Fix burst mode Lars-Peter Clausen
2015-05-16 10:00 ` Jonathan Cameron
2015-05-15 15:18 ` [PATCH 5/5] iio: adis16400: Fix burst transfer for adis16448 Lars-Peter Clausen
2015-05-16 10:01 ` 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=1431703118-32676-2-git-send-email-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox