[PATCH v4 00/15] Add support for AD7091R-2/-4/-8

From: Marcelo Schmitt
Date: Sat Dec 16 2023 - 12:45:42 EST


From: Marcelo Schmitt <marcelo.schmitt1@xxxxxxxxx>

----------------- Updates -----------------

Applied changes suggested to the previous set.

Change log v3 -> v4:
- Patch 1: checkpatch patch
* Changed __aligned regex string.
- Patch 2: alert handling fix
* Applied David's suggestion [1] to pass iio_dev on to IRQ thread handler.
- Patches 6, 7, 9
* Removed ad7091r prefix from callback function names.
- New Patch 7: Remove uneeded probe parameters
* Removed id->name and regmap from probe paramenters.
- Patch 8 (now Patch 9): Enable internal vref
* Not expecting NULL return from regulator_get_optional() anymore;
* Reverted to previous probe defer handling.
- Patch 10 (now Patch 11): dt doc
* Extending existing ad7091r5 dt doc instead of creating a new one;
* Added VDD and VDRIVE supplies to dt doc;
* Removed channel property from dt doc;
* Interrupt description, interrupt constraint check, example indentation improvements.
- Patch 12 (now Patch 13): add ad7091r8 patch
* Neats to macros, gpio setups, and probe parameters.
- Patch 13 (now Patch 14):
* Made use of wild cards in MAINTAINERS file.
- New Patch (Patch 15): event configuration callbacks

[1]: https://lore.kernel.org/linux-iio/CAMknhBHCYicEL_xhumBQMUm=HBVb=7dLrYsK8Zj2o7RodvMarw@xxxxxxxxxxxxxx/

Thank you all for the help with this set,
Marcelo

----------------- Context -----------------

This series adds support for AD7091R-2/-4/-8 ADCs which can do single shot
or sequenced readings. Threshold events are also supported.
Overall, AD7091R-2/-4/-8 are very similar to AD7091R-5 except they use SPI interface.

Changes have been tested with raspberrypi and eval board on raspberrypi kernel
6.7-rc3 from raspberrypi fork.
Link: https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad7091r8

Marcelo Schmitt (15):
scripts: checkpatch: Add __aligned to the list of attribute notes
iio: adc: ad7091r: Pass iio_dev to event handler
iio: adc: ad7091r: Set alert bit in config register
iio: adc: ad7091r: Align arguments to function call parenthesis
iio: adc: ad7091r: Move generic AD7091R code to base driver and header
file
iio: adc: ad7091r: Move chip init data to container struct
iio: adc: ad7091r: Remove unneeded probe parameters
iio: adc: ad7091r: Set device mode through chip_info callback
iio: adc: ad7091r: Enable internal vref if external vref is not
supplied
iio: adc: ad7091r: Add chip_info callback to get conversion result
channel
iio: adc: Split AD7091R-5 config symbol
dt-bindings: iio: Add AD7091R-8
iio: adc: Add support for AD7091R-8
MAINTAINERS: Add MAINTAINERS entry for AD7091R
iio: adc: ad7091r: Allow users to configure device events

.../bindings/iio/adc/adi,ad7091r5.yaml | 82 +++++-
MAINTAINERS | 8 +
drivers/iio/adc/Kconfig | 16 ++
drivers/iio/adc/Makefile | 4 +-
drivers/iio/adc/ad7091r-base.c | 255 +++++++++++------
drivers/iio/adc/ad7091r-base.h | 81 +++++-
drivers/iio/adc/ad7091r5.c | 120 ++++----
drivers/iio/adc/ad7091r8.c | 257 ++++++++++++++++++
scripts/checkpatch.pl | 1 +
9 files changed, 682 insertions(+), 142 deletions(-)
create mode 100644 drivers/iio/adc/ad7091r8.c

--
2.42.0