iio: adc: at91-sama5d2_adc: add helper for COR register
authorEugen Hristev <eugen.hristev@microchip.com>
Wed, 1 Sep 2021 12:30:09 +0000 (15:30 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 14 Sep 2021 11:00:34 +0000 (12:00 +0100)
commitd8004c5f46ded7c69276fe5d377dc919aefce67d
treeb514156d1b2f3e6d27b4c6c67eacd244a9892ba1
parente6d5eee4dfa28a3517b8089c7a6f3eb3f3fa1456
iio: adc: at91-sama5d2_adc: add helper for COR register

Add helper for the COR register. This helper allows to modify the COR
register, removes duplicate code and improves readability.
The COR offset is now part of the register layout. This will allow
different platform with a different offset to use the same helper.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Link: https://lore.kernel.org/r/20210901123013.329792-7-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/at91-sama5d2_adc.c