iio: adc: stm32-adc: add id registers support
authorOlivier Moysan <olivier.moysan@foss.st.com>
Thu, 15 Sep 2022 13:54:52 +0000 (15:54 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 Sep 2022 17:42:55 +0000 (18:42 +0100)
commit548616242fe025b8c071e8d760fba6c4f71b0bc6
treefce80a95efa6151360eaba0353da23a0aace31ce
parentfd8059ec60193c11e3237bbf86dff4f51946c94e
iio: adc: stm32-adc: add id registers support

Add support of identification registers to STM32 ADC.

By default the ADC hardware instance number is retrieved from
the compatible configuration data. Get the available ADC number
per ADC block, from hardware configuration register,
when this register exists.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20220915135452.1712453-1-olivier.moysan@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stm32-adc-core.c
drivers/iio/adc/stm32-adc-core.h