Commit 95c2ac32 authored by Federico Vaga's avatar Federico Vaga

lib: zero offset bugfix

since the fmc-adc-100 v6 driver the offset accept raw values instead
of microvolts. The user offset was properly set, but the zero offset
was lacking the conversion from uV to raw values.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 85e51a3a
......@@ -525,6 +525,7 @@ static int adc_100m14b4cha_config_chn(struct adc_dev *adc,
case __ADC_CONF_CHN_OFFSET_ZERO:
snprintf(path, sizeof(path), "cset%u/ch%u-offset-zero",
fa->cset, source);
*value = __offset_uv_to_raw(*value);
break;
case ADC_CONF_CHN_SATURATION:
snprintf(path, sizeof(path), "cset%u/ch%u-saturation",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment