Fix bug discovered by Dan Carpenter in the "staging" sources.
In dt9212_configure_gain(), some bitmask constants were OR'ed together
logically (giving the value 1) when they should have been OR'ed together
bitwise. The effect of this bug is that the analog gain would be set
incorrectly on the AI subdevice for certain ranges.
As it happens, the driver is incomplete regarding range settings anyway,
so the bug fix currently has no effect.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
// 11x -> Gain = 0.5
case DT9812_GAIN_0PT5:{
rmw->or_value = F020_MASK_ADC0CF_AMP0GN2
- || F020_MASK_ADC0CF_AMP0GN1;
+ | F020_MASK_ADC0CF_AMP0GN1;
}
break;
case DT9812_GAIN_1:{
break;
case DT9812_GAIN_8:{
rmw->or_value = F020_MASK_ADC0CF_AMP0GN1
- || F020_MASK_ADC0CF_AMP0GN0;
+ | F020_MASK_ADC0CF_AMP0GN0;
}
break;
case DT9812_GAIN_16:{