aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-05-24 13:08:29 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-05-24 14:10:15 +0200
commit2421efd8de974fee6a06e45ca31d4ed6f4805573 (patch)
tree4266ffeea5ba1a097b1b33cee3f13c0a0189d2ab /drivers/mfd
parent80d15c4a6f8bcfb0087a6c3da0cd87f6e8a8ca58 (diff)
downloadkernel_goldelico_gta04-2421efd8de974fee6a06e45ca31d4ed6f4805573.zip
kernel_goldelico_gta04-2421efd8de974fee6a06e45ca31d4ed6f4805573.tar.gz
kernel_goldelico_gta04-2421efd8de974fee6a06e45ca31d4ed6f4805573.tar.bz2
twl4030-madc: Request processed values in twl4030_get_madc_conversion
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>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/twl4030-madc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c
index 4c583e4..f5e505b 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)