android_kernel_xiaomi_sm8350/drivers/iio
William Breathitt Gray 9a2a6443d6 iio: dac: cio-dac: Fix max DAC write value check for 12-bit
commit c3701185ee1973845db088d8b0fc443397ab0eb2 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-20 12:07:34 +02:00
..
accel iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() 2023-03-11 16:44:15 +01:00
adc iio: adc: ti-ads7950: Set can_sleep flag for GPIO chip 2023-04-20 12:07:34 +02:00
afe
amplifiers
buffer
chemical
common
dac iio: dac: cio-dac: Fix max DAC write value check for 12-bit 2023-04-20 12:07:34 +02:00
dummy
frequency
gyro
health iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-12-08 11:23:02 +01:00
humidity
imu
light iio: light: rpr0521: add missing Kconfig dependencies 2022-12-08 11:23:02 +01:00
magnetometer
multiplexer
orientation
potentiometer
potentiostat
pressure iio: pressure: ms5611: fixed value compensation bug 2022-12-08 11:23:00 +01:00
proximity
resolver
temperature
trigger iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() 2022-11-25 17:42:19 +01:00
iio_core_trigger.h
iio_core.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-12-08 11:22:59 +01:00
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c
Kconfig
Makefile