[3.11.y.z extended stable] Patch "twl4030-madc: Request processed values in twl4030_get_madc_conversion" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Tue Jul 1 08:51:08 UTC 2014


This is a note to let you know that I have just added a patch titled

    twl4030-madc: Request processed values in twl4030_get_madc_conversion

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 0617310208b120da2be039d76012a4365080e3a7 Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact at paulk.fr>
Date: Sat, 24 May 2014 13:09:00 +0100
Subject: twl4030-madc: Request processed values in twl4030_get_madc_conversion

commit e0326be0cded13dfc3a24cbeece1f1ae64348a0e upstream.

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 at paulk.fr>
Acked-by: Sebastian Reichel <sre at kernel.org>
Signed-off-by: Jonathan Cameron <jic23 at kernel.org>
[ luis: backported to 3.11:
  - file rename: drivers/iio/adc/twl4030-madc.c -> drivers/mfd/twl4030-madc.c ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/mfd/twl4030-madc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c
index 1ea54d4d003a..10588120e294 100644
--- a/drivers/mfd/twl4030-madc.c
+++ b/drivers/mfd/twl4030-madc.c
@@ -614,6 +614,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.9.1





More information about the kernel-team mailing list