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
Makefile
ad5064.c
ad5360.c
ad5380.c
ad5421.c
ad5446.c
ad5449.c
ad5504.c
ad5592r-base.c
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
ad5686-spi.c
ad5686.c
ad5686.h
ad5696-i2c.c
ad5755.c
ad5758.c
ad5761.c
ad5764.c
ad5766.c
ad5770r.c
ad5791.c
ad7303.c
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
m62332.c
max517.c
max5821.c
mcp4725.c
mcp4922.c
stm32-dac-core.c
stm32-dac-core.h
stm32-dac.c
ti-dac082s085.c
ti-dac5571.c
ti-dac7311.c
ti-dac7612.c
vf610_dac.c