diff options
author | Kim Seer Paller <kimseer.paller@analog.com> | 2025-06-26 11:38:12 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-06-29 19:15:40 +0300 |
commit | 1131e70558bc70f1fc52515281de2663e961e1cc (patch) | |
tree | c2435dcb111ab6e5d834574cbd30ec09d6663e91 /scripts/gdb/linux/interrupts.py | |
parent | 24fa69894ea3f76ecb13d7160692ee574a912803 (diff) | |
download | linux-1131e70558bc70f1fc52515281de2663e961e1cc.tar.xz |
iio: dac: ad3530r: Fix incorrect masking for channels 4-7 in powerdown mode
In the current implementation of ad3530r_set_dac_powerdown() function,
the macro AD3530R_OP_MODE_CHAN_MSK(chan->channel) is used to generate
the bitmask for the operating mode of a specific channel. However, this
macro does not account for channels 4-7, which map to the second
register AD3530R_OUTPUT_OPERATING_MODE_1 for the 8 channeled device. As
a result, the bitmask is incorrectly calculated for these channels,
leading to improper configuration of the powerdown mode. Resolve this
issue by adjusting the channel index for channels 4-7 by subtracting 4
before applying the macro. This ensures that the correct bitmask is
generated for the second register.
Fixes: 93583174a3df ("iio: dac: ad3530r: Add driver for AD3530R and AD3531R")
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250626-bug_fix-v1-1-eb3c2b370f10@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'scripts/gdb/linux/interrupts.py')
0 files changed, 0 insertions, 0 deletions