iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits
authorCosmin Tanislav <demonsingur@gmail.com>
Wed, 12 Jan 2022 20:00:36 +0000 (22:00 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 23 Jan 2022 18:23:48 +0000 (18:23 +0000)
commit0e33d15f1dce9e3a80a970ea7f0b27837168aeca
treec74ea696bd2ad15adbea05ef70fdbd6cef5f9c71
parentb7a78a8adaa8849c02f174d707aead0f85dca0da
iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits

According to page 90 of the datasheet [1], AIN_BUFP is bit 6 and
AIN_BUFM is bit 5 of the CONFIG_0 -> CONFIG_7 registers.

Fix the mask used for setting these bits.

[1]: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7124-8.pdf

Fixes: 0eaecea6e487 ("iio: adc: ad7124: Add buffered input support")
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220112200036.694490-1-cosmin.tanislav@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7124.c