linux/drivers/iio
Rodrigo Alencar 664b13498f iio: dac: ad5686: fix ref bit initialization for single-channel parts
[ Upstream commit ecae2ae606 ]

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: be1b24d245 ("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>
[ adapted `has_external_vref` to the in-tree equivalent `voltage_uv` variable in the `val =` computation ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-06-19 13:33:47 +02:00
..
accel iio: Use IRQF_NO_THREAD 2026-03-04 07:20:17 -05:00
adc iio: adc: viperboard: Fix error handling in vprbrd_iio_read_raw 2026-06-19 13:33:27 +02:00
addac iio: addac: stx104: Fix race condition when converting analog-to-digital 2023-08-26 14:23:27 +02:00
afe iio: afe: rescale: Accept only offset channels 2023-11-08 17:26:42 +01:00
amplifiers iio: amplifiers: hmc425a: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
buffer iio: buffer: hw-consumer: fix use-after-free in error path 2026-06-19 13:33:27 +02:00
cdc iio:cdc:ad7150: Fix use of uninitialized ret 2021-04-07 08:36:39 +01:00
chemical iio: chemical: scd30: fix division by zero in write_raw 2026-06-19 13:33:47 +02:00
common iio: ssp_sensors: cancel delayed work_refresh on remove 2026-06-19 13:33:27 +02:00
dac iio: dac: ad5686: fix ref bit initialization for single-channel parts 2026-06-19 13:33:47 +02:00
dummy iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer 2025-01-23 17:15:54 +01:00
frequency iio: frequency: adf4350: Fix prescaler usage. 2025-10-19 16:21:45 +02:00
gyro iio: gyro: adis16260: fix division by zero in write_raw 2026-06-19 13:33:47 +02:00
health iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-12-08 11:28:38 +01:00
humidity iio:humidity:hts221: rearrange iio trigger get and register 2022-06-29 09:03:27 +02:00
imu iio: imu: st_lsm6dsx: fix stack leak in tagged FIFO buffer 2026-06-19 13:33:26 +02:00
light iio: light: cm3323: fix reg_conf not being initialized correctly 2026-06-19 13:33:27 +02:00
magnetometer iio: magnetometer: st_magn: fix default DRDY pin selection for LIS2MDL 2026-06-19 13:33:27 +02:00
multiplexer iio: multiplexer: iio-mux: Simplify with dev_err_probe() 2020-09-03 19:40:51 +01:00
orientation iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
position iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
potentiometer iio: potentiometer: mcp4131: fix double application of wiper shift 2026-04-18 10:33:16 +02:00
potentiostat iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-05-17 13:54:30 +01:00
pressure iio: pressure: bmp280: Use IS_ERR() in bmp280_common_probe() 2025-08-28 16:24:35 +02:00
proximity iio: proximity: isl29501: fix buffered read on big-endian systems 2025-08-28 16:24:35 +02:00
resolver iio:resolver:ad2s1200: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
temperature iio: temperature: tsys01: fix broken PROM checksum validation 2026-06-19 13:33:27 +02:00
test iio/test-format: build kunit tests without structleak plugin 2021-10-06 17:53:36 -06:00
trigger iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() 2022-11-26 09:24:46 +01:00
iio_core.h iio: buffer: fix use-after-free for attached_buffers array 2021-03-25 19:13:51 +00:00
iio_core_trigger.h iio: core-trigger: make iio_device_register_trigger_consumer() an int return 2021-03-11 20:47:02 +00:00
industrialio-buffer.c iio: buffer: Fix file related error handling in IIO_BUFFER_GET_FD_IOCTL 2022-02-16 12:56:37 +01:00
industrialio-configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-core.c driver: iio: add missing checks on iio_info's callback access 2026-04-18 10:33:17 +02:00
industrialio-event.c driver: iio: add missing checks on iio_info's callback access 2026-04-18 10:33:17 +02:00
industrialio-sw-device.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-12-02 17:41:08 +01:00
industrialio-trigger.c iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046 2022-01-27 11:02:57 +01:00
industrialio-triggered-event.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
inkern.c driver: iio: add missing checks on iio_info's callback access 2026-04-18 10:33:17 +02:00
Kconfig iio: add addac subdirectory 2023-08-26 14:23:26 +02:00
Makefile iio: add addac subdirectory 2023-08-26 14:23:26 +02:00
TODO iio: add a TODO 2020-03-08 17:28:53 +00:00