summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorIbrahim Tilki <Ibrahim.Tilki@analog.com>2022-11-22 14:47:18 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-11-23 23:32:16 +0300
commit99b43a15915543484d7538cb32f49901e802628a (patch)
tree7bd08df74bf0e73e55977b3cae43502740e5ee1d /drivers/iio
parent1140f96cd4af9bcf0065b0295c4486e1dba8426e (diff)
downloadlinux-99b43a15915543484d7538cb32f49901e802628a.tar.xz
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: a44ef7c46097 ("iio: adc: add max11410 adc driver") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com> Link: https://lore.kernel.org/r/20221122114718.17557-1-Ibrahim.Tilki@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/max11410.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/max11410.c b/drivers/iio/adc/max11410.c
index 8cd566367187..fdc9f03135b5 100644
--- a/drivers/iio/adc/max11410.c
+++ b/drivers/iio/adc/max11410.c
@@ -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)