]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting...
authorRodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
Thu, 17 Jul 2025 22:13:49 +0000 (19:13 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Aug 2025 10:57:04 +0000 (11:57 +0100)
commitd75c7021c08e8ae3f311ef2464dca0eaf75fab9f
tree1053d13f9fea5c4212283ad8dd6ca64ebadf06df
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting register

avg sample info is a bit field coded inside the following
bits: 5,6,7 and 8 of a device status register.

Channel num info the same, but over bits: 1, 2 and 3.

Mask both values in order to avoid touching other register bits,
since the first info (avg sample), came from DT.

Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250717221559.158872-1-rodrigo.gobbi.7@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/spear_adc.c