mirror-linux/drivers/iio/dac
Kim Seer Paller 1131e70558 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: 93583174a3 ("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>
2025-06-29 17:15:40 +01:00
..
Kconfig iio: dac: ad3530r: Add driver for AD3530R and AD3531R 2025-05-21 14:20:29 +01:00
Makefile iio: dac: ad3530r: Add driver for AD3530R and AD3531R 2025-05-21 14:20:29 +01:00
ad3530r.c iio: dac: ad3530r: Fix incorrect masking for channels 4-7 in powerdown mode 2025-06-29 17:15:40 +01:00
ad3552r-common.c iio: dac: ad3552r-hs: add debugfs reg access 2025-04-22 19:09:53 +01:00
ad3552r-hs.c iio: dac: ad3552r-hs: add support for internal ramp 2025-04-22 19:10:04 +01:00
ad3552r-hs.h iio: dac: adi-axi-dac: add bus mode setup 2025-02-08 15:10:11 +00:00
ad3552r.c IIO: New device support, features and cleanup for the 6.15 cycle. 2025-03-14 07:15:12 +01:00
ad3552r.h iio: dac: ad3552r-hs: add debugfs reg access 2025-04-22 19:09:53 +01:00
ad5064.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5360.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5380.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5421.c iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00
ad5446.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5449.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5504.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5592r-base.c iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw() 2025-05-21 14:20:27 +01:00
ad5592r-base.h
ad5592r.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5593r.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5624r.h iio: dac: ad5624r: Drop docs of missing members 2024-12-28 14:28:13 +00:00
ad5624r_spi.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5686-spi.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5686.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5686.h iio: dac: ad5686: use devm_regulator_get_enable_read_voltage() 2024-12-07 17:47:35 +00:00
ad5696-i2c.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5755.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5758.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5761.c iio: dac: ad5761: remove bits_per_word = 8 2025-05-21 14:20:30 +01:00
ad5764.c
ad5766.c iio: dac: ad5766: remove bits_per_word = 8 2025-05-21 14:20:30 +01:00
ad5770r.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad5791.c iio: dac: ad5791: remove bits_per_word = 8 2025-05-21 14:20:30 +01:00
ad7293.c iio: dac: ad7293: add adc reference configuration 2025-05-21 14:20:29 +01:00
ad7303.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad8460.c iio: dac: ad8460: Stop using iio_device_claim_direct_scoped() 2025-02-17 13:03:24 +00:00
ad8801.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad9739a.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
adi-axi-dac.c IIO: New device support, features and cleanup for 6.16 - take 2 2025-05-22 15:54:52 +02:00
cio-dac.c 1st set of IIO new device support, features and cleanups for the 6.4 cycle. 2023-04-12 09:45:34 +02:00
dpot-dac.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ds4424.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
lpc18xx_dac.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ltc1660.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ltc2632.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ltc2664.c iioc: dac: ltc2664: Fix span variable usage in ltc2664_channel_config() 2024-10-06 16:31:46 +01:00
ltc2688.c iio: dac: ltc2688: remove bits_per_word = 8 2025-05-21 14:20:31 +01:00
m62332.c iio: dac: m62332: Get platform data via dev_get_platdata() 2024-09-30 09:21:00 +01:00
max517.c iio: dac: max517: Get platform data via dev_get_platdata() 2024-09-30 09:21:00 +01:00
max5522.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
max5821.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp4725.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp4728.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp4821.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp4922.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
rohm-bd79703.c iio: dac: bd79703: Support ROHM BD79702 2025-04-22 19:09:57 +01:00
stm32-dac-core.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
stm32-dac-core.h
stm32-dac.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ti-dac082s085.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ti-dac5571.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ti-dac7311.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ti-dac7612.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
vf610_dac.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00