iio: adc: max11410: fix incomplete vref buffer mask
PATCH 1/1 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.
Reported-by kernel test robot <[email protected]>
Reported-by Julia Lawall <[email protected]>
Signed-off-by Ibrahim Tilki <[email protected]>
--- drivers/iio/adc/max11410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/max11410.c +1 -1
@@ -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)
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerQuoted 8 lines · On Tue, 22 Nov 2022 14:47:18 +0300 Ibrahim Tilki <[email protected]>…
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.
Reported-by kernel test robot <[email protected]>Reported-by Julia Lawall <[email protected]>Signed-off-by Ibrahim Tilki <[email protected]>
Applied and I added a fixes tag (given I've just rebased for a broken fixes tag I'm glad you didn't as it would have been wrong anyway!)
Thanks,
Jonathan
Quoted 17 lines
--- drivers/iio/adc/max11410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/adc/max11410.c +1
-1@@ -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)