]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: dac: ad5686: fix ref bit initialization for single-channel parts
authorRodrigo Alencar <rodrigo.alencar@analog.com>
Fri, 1 May 2026 09:14:54 +0000 (10:14 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 15 May 2026 11:05:34 +0000 (12:05 +0100)
commitecae2ae606d493cf11457946436335bd0e726663
treeaa860c095c71849953b8a7fdc47349b0fb5f190b
parenteedf7602fbd929e97e0c480da501dc7a34beb2a8
iio: dac: ad5686: fix ref bit initialization for single-channel parts

The reference bit position was ignored when writing the register at the
probe() function (!!val was used). When such bit is 1, internal voltage
reference is disabled so that an external one can be used. For
multi-channel devices, bit 0 of the Internal Reference Setup command
behaves the same way, so AD5686_REF_BIT_MSK is created. The issue exists
since support for single-channel devices were first introduced.

Fixes: be1b24d24541 ("iio:dac:ad5686: Add AD5691R/AD5692R/AD5693/AD5693R support")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/dac/ad5686.c
drivers/iio/dac/ad5686.h