linux/drivers/iio/dac
Rodrigo Alencar 8aeaf25a85 iio: dac: ad5686: fix powerdown control on dual-channel devices
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. Mask as 0x3U is used rather than 0x3, because shift can reach
value of 30 (last channel of a 16-channel device), which would mess with
the sign bit. The issue was introduced when first adding support for
dual-channel devices, which overlooked powerdown control differences.

Fixes: 7dc8faeab3 ("iio: dac: ad5686: add support for AD5338R")
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
History 2026-05-15 12:05:35 +01:00
..
ad3530r.c iio: dac: ad3530r: Fix AD3531/AD3531R powerdown mode strings 2026-05-15 12:05:35 +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: fix out-of-bound write in ad3552r_hs_write_data_source 2026-01-11 13:25:15 +00:00
ad3552r-hs.h iio: dac: adi-axi-dac: add bus mode setup 2025-02-08 15:10:11 +00:00
ad3552r.c iio: dac: ad3552r: use = { } instead of memset() 2025-06-26 19:32:56 +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: dac: ad5360: converting to guard(mutex) 2026-03-03 21:20:00 +00:00
ad5380.c iio: dac: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:48 +01:00
ad5421.c iio: dac: ad5421: use int type to store negative error codes 2025-09-01 20:43:43 +01:00
ad5446-i2c.c iio: dac: ad5446: Separate I2C/SPI into different drivers 2025-11-09 16:15:13 +00:00
ad5446-spi.c iio: dac: ad5446: Add AD5542 to the spi id table 2025-11-09 16:32:29 +00:00
ad5446.c iio: dac: ad5446: Fix coding style issues 2025-11-09 16:31:22 +00:00
ad5446.h iio: dac: ad5446: Refactor header inclusion 2025-11-09 16:30:47 +00: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 treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
ad5592r-base.h iio: dac: ad5592r: Fix alignment for DMA safety 2022-06-14 11:53:16 +01:00
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: dac: ad5686: fix powerdown control on dual-channel devices 2026-05-15 12:05:35 +01:00
ad5686.h iio: dac: ad5686: fix ref bit initialization for single-channel parts 2026-05-15 12:05:34 +01: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 iio: dac: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:48 +01:00
ad5766.c iio: dac: ad5766: remove bits_per_word = 8 2025-05-21 14:20:30 +01:00
ad5770r.c iio: dac: ad5770r: fix error return in ad5770r_read_raw() 2026-03-22 11:46:26 +00:00
ad5791.c iio: dac: ad5791: drop unused member of struct ad5791_state 2025-08-16 14:42:02 +01:00
ad7293.c iio: dac: ad7293: use dev_err_probe() 2026-02-28 11:35:24 +00: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: dac: adi-axi-dac: remove unused int_tone field 2026-03-03 21:20:02 +00: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: dac: ds4424: add Rfs-based scale and per-variant limits 2026-03-22 12:44:23 +00:00
Kconfig iio: dac: ds4424: convert to regmap 2026-03-22 12:44:23 +00: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: dac: ltc2632: add support for LTC2654 DAC family 2026-03-21 15:40:18 +00: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: use the auto lock API 2025-10-19 11:59:18 +01:00
m62332.c iio: dac: m62332: Get platform data via dev_get_platdata() 2024-09-30 09:21:00 +01:00
Makefile iio: dac: Add MAX22007 DAC driver support 2026-01-23 08:15:00 +00:00
max517.c iio: Remove single use of macro definition for driver name 2025-06-09 07:45:36 +01:00
max5522.c iio: dac: max5522: simplify probe with devm_regulator_get_enable_read_voltage() 2026-02-23 08:24:24 +00:00
max5821.c iio: dac: max5821: fix return value check in powerdown sync 2026-05-15 12:05:34 +01:00
max22007.c iio: dac: Add MAX22007 DAC driver support 2026-01-23 08:15:00 +00:00
mcp47feb02.c iio: dac: mcp47feb02: Fix Vref validation [1-999] case 2026-03-15 12:27:41 +00:00
mcp4725.c iio: Remove single use of macro definition for driver name 2025-06-09 07:45:36 +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: convert to use maple tree register cache 2025-06-26 19:32:52 +01:00
stm32-dac-core.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
stm32-dac-core.h iio: stm32: Adopt SPDX identifier 2018-01-08 16:03:41 +01:00
stm32-dac.c iio: dac: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-30 20:50:21 +01:00
ti-dac082s085.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ti-dac5571.c iio: dac: ti-dac5571: remove unused id field 2026-03-03 21:20:02 +00:00
ti-dac7311.c iio: dac: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:48 +01:00
ti-dac7612.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
vf610_dac.c iio: dac: vf610: Simplify with devm_clk_get_enabled() 2025-07-14 19:20:54 +01:00