Commit 99b43a15 authored by Ibrahim Tilki's avatar Ibrahim Tilki Committed by Jonathan Cameron

iio: adc: max11410: fix incomplete vref buffer mask

VREFP bit was missing from channel configuration mask and VREFN bit was
included twice instead which fails to enable positive reference buffer when
requested by a channel. Channels that don't enable vrefp buffer were not
affected.

Fixes: a44ef7c4 ("iio: adc: add max11410 adc driver")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarIbrahim Tilki <Ibrahim.Tilki@analog.com>
Link: https://lore.kernel.org/r/20221122114718.17557-1-Ibrahim.Tilki@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1140f96c
......@@ -370,7 +370,7 @@ static int max11410_configure_channel(struct max11410_state *st,
FIELD_PREP(MAX11410_CTRL_UNIPOLAR_BIT, cfg.bipolar ? 0 : 1);
ret = regmap_update_bits(st->regmap, MAX11410_REG_CTRL,
MAX11410_CTRL_REFSEL_MASK |
MAX11410_CTRL_VREFN_BUF_BIT |
MAX11410_CTRL_VREFP_BUF_BIT |
MAX11410_CTRL_VREFN_BUF_BIT |
MAX11410_CTRL_UNIPOLAR_BIT, regval);
if (ret)
......
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