From: Paul Kocialkowski <contact@paulk.fr>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Subject: [PATCH] twl4030-madc: Request processed values in twl4030_get_madc_conversion
Date: Sat, 24 May 2014 14:09:58 +0200 [thread overview]
Message-ID: <1400933398.2079.16.camel@aldrin> (raw)
Not setting the raw parameter in the request causes it to be randomly
initialized to a value that might be different from zero or zero. This leads to
values that are randomly either raw or processed, making it very difficult to
make reliable use of the values.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
drivers/iio/adc/twl4030-madc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c
index 7de1c4c..eb86786 100644
--- a/drivers/iio/adc/twl4030-madc.c
+++ b/drivers/iio/adc/twl4030-madc.c
@@ -645,6 +645,7 @@ int twl4030_get_madc_conversion(int channel_no)
req.channels = (1 << channel_no);
req.method = TWL4030_MADC_SW2;
req.active = 0;
+ req.raw = 0;
req.func_cb = NULL;
ret = twl4030_madc_conversion(&req);
if (ret < 0)
--
1.7.9.5
next reply other threads:[~2014-05-24 12:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-24 12:09 Paul Kocialkowski [this message]
2014-06-02 18:00 ` [PATCH] twl4030-madc: Request processed values in twl4030_get_madc_conversion Jonathan Cameron
2014-06-02 18:10 ` Sebastian Reichel
2014-06-02 19:17 ` Paul Kocialkowski
2014-06-02 20:56 ` Jonathan Cameron
2014-06-02 20:54 ` 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=1400933398.2079.16.camel@aldrin \
--to=contact@paulk.fr \
--cc=jic23@kernel.org \
--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).