Re: [PATCH 07/10] iio: dac: ad5686: fix powerdown control on dual-channel devices

From: Jonathan Cameron

Date: Sun Apr 26 2026 - 09:48:54 EST


On Sun, 26 Apr 2026 09:38:08 +0100
Rodrigo Alencar via B4 Relay <devnull+rodrigo.alencar.analog.com@xxxxxxxxxx> wrote:

> From: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>
>
> Fix powerdown control by using a proper bit shift for the powerdown mask
> values. During initialization, powerdown bits are initialized so that
> unused bits are set to 1 and the correct bit shift is used. Dual-channel
> devices use one-hot encoding in the address and that reflects on the
> position of the powerdown bits, which are not channel-index based
> for that case. Quad-channel devices also use one-hot encoding for the
> channel address but the result of log2(address) coincides with the channel
> index value. The issue was introduced when first adding support for
> dual-channel devices, which overlooked powerdown control differences.
>
> Fixes: 7dc8faeab3e3 ("iio: dac: ad5686: add support for AD5338R")

Move to start of set.

> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>