twl4030-madc: Request processed values in twl4030_get_madc_conversion
PATCH 1/1 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.
--- drivers/iio/adc/twl4030-madc.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/adc/twl4030-madc.c +1 -0
@@ -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 )
Signature · 1 line
1.7.9.5
Jonathan Cameron
maintainerQuoted 6 lines · Paul Kocialkowski
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 <[email protected]>
This one seems obvious enough to me that I've applied it to the fixes-togreg branch. Note you should cc the author or if the log makes it clear someone else has been working with the driver recently, then cc them.
In this case Sebastian.
With quite a few of these mfd element drivers, the chance the relevant author is still subscribed to the list is next to none (here goes for being proved wrong ;)
Thanks for the patch!
Jonathan
Quoted 17 lines
--- drivers/iio/adc/twl4030-madc.c | 1 + 1 file changed, 1 insertion(+)drivers/iio/adc/twl4030-madc.c +1
-0@@ -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 )
Sebastian Reichel
Acked-byHi,
Quoted 6 lines · Jonathan Cameron
Quoted 5 lines · Paul Kocialkowski
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.
Quoted 6 lines
Quoted 1 line
Signed-off-by Paul Kocialkowski <[email protected]>This one seems obvious enough to me that I've applied it to the fixes-togreg branch. Note you should cc the author or if the log makes it clear someone else has been working with the driver recently, then cc them.
In this case Sebastian.
The commit message looks a bit odd "[...] different from zero or zero". In case this is still relevant:
Quoted 1 line
[...]
-- Sebastian
Quoted 15 lines · Sebastian Reichel
Hi,
Quoted 12 lines · Jonathan Cameron
Quoted 6 lines · Paul Kocialkowski
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 <[email protected]>This one seems obvious enough to me that I've applied it to the fixes-togreg branch. Note you should cc the author or if the log makes it clear someone else has been working with the driver recently, then cc them.
In this case Sebastian.
Thanks for your feedback and sorry that I didn't check the previous contributors to the driver!
Quoted 2 lines
The commit message looks a bit odd "[...] different from zero or zero".
How about replacing that with: "that may or may not be zero" and inversing "processed" and "raw" in the next sentence (if that's not too late)? The commit message would be:
Not setting the raw parameter in the request causes it to be randomly initialized to a value that may or may not be zero. This leads to values that are randomly either processed or raw, making it very difficult to make reliable use of the values.
Quoted 3 lines
In case this is still relevant:
Paul
Jonathan Cameron
maintainerQuoted 16 lines · Sebastian Reichel
Hi,
Quoted 6 lines · Jonathan Cameron
Quoted 5 lines · Paul Kocialkowski
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.
Quoted 6 lines
Quoted 1 line
Signed-off-by Paul Kocialkowski <[email protected]>This one seems obvious enough to me that I've applied it to the fixes-togreg branch. Note you should cc the author or if the log makes it clear someone else has been working with the driver recently, then cc them.
In this case Sebastian.
Quoted 4 lines
The commit message looks a bit odd "[...] different from zero or zero". In case this is still relevant:
Given I was a muppet and applied it to the wrong branch, I've added the ack and now applied it to the fixes-togreg branch....
Quoted 5 lines
Quoted 2 lines
[...]
-- Sebastian
Jonathan Cameron
maintainerQuoted 23 lines · Paul Kocialkowski
Quoted 15 lines · Sebastian Reichel
Hi,
Quoted 12 lines · Jonathan Cameron
Quoted 6 lines · Paul Kocialkowski
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 <[email protected]>This one seems obvious enough to me that I've applied it to the fixes-togreg branch. Note you should cc the author or if the log makes it clear someone else has been working with the driver recently, then cc them.
In this case Sebastian.Thanks for your feedback and sorry that I didn't check the previous contributors to the driver!
Quoted 2 lines
The commit message looks a bit odd "[...] different from zero or zero".
Quoted 8 lines
How about replacing that with: "that may or may not be zero" and inversing "processed" and "raw" in the next sentence (if that's not too late)? The commit message would be:
Not setting the raw parameter in the request causes it to be randomly initialized to a value that may or may not be zero. This leads to values that are randomly either processed or raw, making it very difficult to make reliable use of the values.
Whilst original text was a little unwieldy it was clear enough so I've left it bit.
Quoted 7 lines
Quoted 4 lines
In case this is still relevant:
Paul