WSL2-Linux-Kernel/drivers/iio/dac
William Breathitt Gray 77593b4e96 iio: dac: cio-dac: Fix max DAC write value check for 12-bit
commit c3701185ee upstream.

The CIO-DAC series of devices only supports DAC values up to 12-bit
rather than 16-bit. Trying to write a 16-bit value results in only the
lower 12 bits affecting the DAC output which is not what the user
expects. Instead, adjust the DAC write value check to reject values
larger than 12-bit so that they fail explicitly as invalid for the user.

Fixes: 3b8df5fd52 ("iio: Add IIO support for the Measurement Computing CIO-DAC family")
Cc: stable@vger.kernel.org
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/20230311002248.8548-1-william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 16:48:22 +02:00
..
Kconfig iio: dac: ad5686: Add support for AD5673R/AD5677R 2021-03-11 20:47:10 +00:00
Makefile iio: dac: ad5766: add driver support for AD5766 2021-01-22 08:52:05 +00:00
ad5064.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad5360.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad5380.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad5421.c
ad5446.c iio: dac: ad5446: Fix read_raw not returning set value 2022-05-09 09:14:28 +02:00
ad5449.c
ad5504.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad5592r-base.c iio: dac: ad5592r: Fix the missing return value. 2022-05-09 09:14:28 +02:00
ad5592r-base.h
ad5592r.c
ad5593r.c iio: dac: ad5593r: Fix i2c read protocol requirements 2022-10-26 12:34:19 +02:00
ad5624r.h
ad5624r_spi.c iio: dac: ad5624r: Fix incorrect handling of an optional regulator. 2021-07-19 09:51:58 +01:00
ad5686-spi.c
ad5686.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad5686.h iio: dac: ad5686: Add support for AD5673R/AD5677R 2021-03-11 20:47:10 +00:00
ad5696-i2c.c iio: dac: ad5686: Add support for AD5673R/AD5677R 2021-03-11 20:47:10 +00:00
ad5755.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad5758.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad5761.c
ad5764.c
ad5766.c drivers: iio: dac: ad5766: Fix dt property name 2021-11-18 19:16:07 +01:00
ad5770r.c iio: ad5770r: make devicetree property reading consistent 2021-11-18 19:16:07 +01:00
ad5791.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad7303.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ad8801.c
cio-dac.c iio: dac: cio-dac: Fix max DAC write value check for 12-bit 2023-04-13 16:48:22 +02:00
dpot-dac.c
ds4424.c
lpc18xx_dac.c
ltc1660.c
ltc2632.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
m62332.c
max517.c iio:dac:max517.c: Use devm_iio_device_register() 2021-03-25 19:13:52 +00:00
max5821.c iio: dac: max5821: convert device register to device managed function 2021-07-31 18:17:22 +01:00
mcp4725.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
mcp4922.c
stm32-dac-core.c
stm32-dac-core.h
stm32-dac.c iio: dac: stm32-dac: Use pm_runtime_resume_and_get() to replace open coding. 2021-05-17 13:54:26 +01:00
ti-dac082s085.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ti-dac5571.c iio: dac: ti-dac5571: fix an error code in probe() 2021-09-14 12:02:08 +01:00
ti-dac7311.c iio: dac: Convert powerdown read callbacks to sysfs_emit() 2021-03-29 11:12:30 +01:00
ti-dac7612.c
vf610_dac.c