Files
linux/drivers
Claudiu Beznea 513c72d76d iio: adc: at91-sama5d2_adc: lock around oversampling and sample freq
[ Upstream commit 9780a23ed5 ]

.read_raw()/.write_raw() could be called asynchronously from user space
or other in kernel drivers. Without locking on st->lock these could be
called asynchronously while there is a conversion in progress. Read will
be harmless but changing registers while conversion is in progress may
lead to inconsistent results. Thus, to avoid this lock st->lock.

Fixes: 27e1771908 ("iio:adc:at91_adc8xx: introduce new atmel adc driver")
Fixes: 6794e23fa3 ("iio: adc: at91-sama5d2_adc: add support for oversampling resolution")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220803102855.2191070-4-claudiu.beznea@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:25:30 +02:00
..
2022-10-26 13:25:09 +02:00
2022-10-26 13:25:22 +02:00
2021-03-04 11:38:21 +01:00
2022-05-09 09:04:56 +02:00
2022-08-31 17:15:23 +02:00
2021-11-18 14:03:51 +01:00
2022-10-26 13:25:24 +02:00
2022-04-13 21:00:55 +02:00
2022-08-25 11:38:14 +02:00