linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] twl4030-madc: Request processed values in twl4030_get_madc_conversion
@ 2014-05-24 12:09 Paul Kocialkowski
  2014-06-02 18:00 ` Jonathan Cameron
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Kocialkowski @ 2014-05-24 12:09 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-02 20:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-24 12:09 [PATCH] twl4030-madc: Request processed values in twl4030_get_madc_conversion Paul Kocialkowski
2014-06-02 18:00 ` 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

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).