Commit d7712bbb authored by Federico Vaga's avatar Federico Vaga

drv: the voltage range is irrelevant when using pattern

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 3a5af982
......@@ -201,8 +201,7 @@ int fa_adc_range_set(struct fa_dev *fa, struct zio_channel *chan, int range)
i = zfad_get_chx_index(ZFA_CHx_CTL_RANGE, chan->index);
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[i], zfad_hw_range[range]);
if (range == FA100M14B4C_RANGE_OPEN ||
(fa->flags & FA_DEV_F_PATTERN_DATA))
if (range == FA100M14B4C_RANGE_OPEN)
range = FA100M14B4C_RANGE_1V;
else if (range >= FA100M14B4C_RANGE_10V_CAL)
range -= FA100M14B4C_RANGE_10V_CAL;
......
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