diff options
author | Marcelo Schmitt <marcelo.schmitt@analog.com> | 2023-12-19 17:32:36 -0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-12-26 15:43:33 +0000 |
commit | 0b76ff46c46332f3415be4dc5f9771d5eb2f0f18 (patch) | |
tree | fadcef64864e870b5a3e5252467b5a1607b571f6 /drivers/iio/adc/ad7091r-base.c | |
parent | 6875b85729f82614a8127792ad0b04c17fb56487 (diff) |
iio: adc: Add support for AD7091R-8
Add support for Analog Devices AD7091R-2, AD7091R-4, and AD7091R-8
low power 12-Bit SAR ADCs with SPI interface.
Extend ad7091r-base driver so it can be used by the AD7091R-8 driver.
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/09d1d1c4b39cecc528488efac6094233715f5659.1703013352.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ad7091r-base.c')
-rw-r--r-- | drivers/iio/adc/ad7091r-base.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c index 665e930d67d0..f4255b91acfc 100644 --- a/drivers/iio/adc/ad7091r-base.c +++ b/drivers/iio/adc/ad7091r-base.c @@ -322,6 +322,12 @@ int ad7091r_probe(struct device *dev, const struct ad7091r_init_info *init_info, iio_dev->info = &ad7091r_info; iio_dev->modes = INDIO_DIRECT_MODE; + if (init_info->setup) { + ret = init_info->setup(st); + if (ret < 0) + return ret; + } + if (irq) { st->chip_info = init_info->info_irq; ret = regmap_update_bits(st->map, AD7091R_REG_CONF, |