linux/drivers/iio
Stephen Boyd b8653aff1c iio: sx9310: Fix semtech,avg-pos-strength setting when > 16
This DT property can be 0, 16, and then 64, but not 32. The math here
doesn't recognize this slight bump in the power of 2 numbers and
translates a DT property of 64 into the register value '3' when it
really should be '2'. Fix it by subtracting one more if the number being
translated is larger than 31. Also use clamp() because we're here.

Cc: Daniel Campello <campello@chromium.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Gwendal Grignou <gwendal@chromium.org>
Cc: Evan Green <evgreen@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20201202200252.986230-1-swboyd@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-01-14 21:01:22 +00:00
..
accel iio: accel: bmc150: Get mount-matrix from ACPI 2020-12-03 19:40:30 +00:00
adc iio: adc: ti_am335x_adc: remove omitted iio_kfifo_free() 2021-01-14 20:56:54 +00:00
afe iio: afe: iio-rescale: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
amplifiers iio: amplifiers: hmc425a: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
buffer iio: buffer: Return error if no callback is given 2020-12-03 19:32:40 +00:00
chemical Second set of features and cleanups for IIO in 5.10 2020-09-22 09:45:11 +02:00
common iio: common: st_sensors: fix possible infinite loop in st_sensors_irq_thread 2021-01-14 20:56:57 +00:00
dac iio: ad5504: Fix setting power-down state 2021-01-14 20:56:56 +00:00
dummy iio: dummy: iio_dummy_evgen: Demote file header and supply description for 'irq_sim_domain' 2020-09-21 18:41:36 +01:00
frequency iio: frequency: adf4350: Replace indio_dev->mlock with own device lock 2020-09-16 18:58:01 +01:00
gyro iio:gyro:mpu3050 Treat otp value as a __le64 and use FIELD_GET() to break up 2020-12-03 19:40:29 +00:00
health Second set of features and cleanups for IIO in 5.10 2020-09-22 09:45:11 +02:00
humidity iio: humidity: hts221: add vdd voltage regulator 2020-12-03 19:32:39 +00:00
imu iio: imu: st_lsm6dsx: fix edge-trigger interrupts 2020-12-03 19:40:31 +00:00
light iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. 2020-12-03 19:40:27 +00:00
magnetometer iio:magnetometer:mag3110: Fix alignment and data leak issues. 2020-12-03 19:40:27 +00:00
multiplexer iio: multiplexer: iio-mux: Simplify with dev_err_probe() 2020-09-03 19:40:51 +01:00
orientation iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
position iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
potentiometer iio: potentiometer: ad5272: Correct polarity of reset 2020-12-03 19:32:42 +00:00
potentiostat iio:potentiostat:lmp91000: Drop of_match_ptr and use generic fw accessors 2020-09-21 18:41:29 +01:00
pressure iio:pressure:mpl3115: Force alignment of buffer 2020-12-03 19:40:28 +00:00
proximity iio: sx9310: Fix semtech,avg-pos-strength setting when > 16 2021-01-14 21:01:22 +00:00
resolver iio:resolver:ad2s1200: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
temperature drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c 2021-01-14 20:56:55 +00:00
trigger Staging / IIO driver patches for 5.11-rc1 2020-12-15 14:18:40 -08:00
iio_core_trigger.h iio: trigger: make stub functions static inline 2020-08-22 10:53:18 +01:00
iio_core.h iio: core: centralize ioctl() calls to the main chardev 2020-11-14 15:31:25 +00:00
industrialio-buffer.c iio: buffer: Fix demux update 2020-12-03 19:32:44 +00:00
industrialio-configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-core.c iio: core: Simplify iio_format_list() 2020-12-03 19:32:44 +00:00
industrialio-event.c iio: core: centralize ioctl() calls to the main chardev 2020-11-14 15:31:25 +00: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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-trigger.c iio:trigger: rename try_reenable() to reenable() plus return void 2020-12-03 19:40:26 +00:00
industrialio-triggered-event.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
inkern.c io:core: In iio_map_array_register() cleanup in case of error 2020-12-03 19:40:25 +00:00
Kconfig iio: Kconfig: Provide title for IIO_TRIGGERED_EVENT symbol 2020-09-29 17:27:08 +01:00
Makefile iio: position: Add support for Azoteq IQS624/625 angle sensors 2020-03-27 08:25:59 +00:00
TODO iio: add a TODO 2020-03-08 17:28:53 +00:00