Add support for AD7091R-2/-4/-8
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest11 patches 4 repliesIn review
- v415 patches 19 repliesApplied
- v313 patches 19 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 7 patches | 9 replies | Superseded | |
| v1 | 7 patches | 3 replies | Superseded |
Changes in v5 from the cover letter · 20 lines
- Patch 1: Event callbacks
* Moved to begin of the series to easy backport;
* Reverted to original event attributes;
* Reworked event configuration to do per direction per channel enable/disable;
* Improved commit message;
* Added fixes tag;
* Added Suggested-by tag.
- Patch 2: Enable internal vref
* Added fixes tag and improved commit message;
* Now earlier in the series to easy backport;
* Used regmap_set_bits() to make code more neat.
- Patch 3: Move generic AD7091R code
* event specs moved earlier in patch 1.
- Patch 4: Move chip init data
* Renamed field to make initialization clearer: irq_info -> info_irq.
* Fixed ad7091r_init_info initialization by passing pointers to info structs;
- Patch 10: Add ad7091r8 support
* Moved bitfield.h include to patch event callbacks patch;
* Dropped GPIO consumer include on ad7091r-base.h and added gpio_desc;
* Removed extra space before devm_gpiod_get_optional().
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | iio: adc: ad7091r: Allow users to configure device eventsdrivers/ drivers/ drivers/ | +166 | 0 replies | |
| 2/11 | iio: adc: ad7091r: Enable internal vref if external vref is not supplieddrivers/ drivers/ | +9 | 0 replies | |
| 3/11 | iio: adc: ad7091r: Move generic AD7091R code to base driver and header filedrivers/ drivers/ drivers/ | +42 | 0 replies | |
| 4/11 | iio: adc: ad7091r: Move chip init data to container structdrivers/ drivers/ drivers/ | +55 | 0 replies | |
| 5/11 | iio: adc: ad7091r: Remove unneeded probe parametersdrivers/ drivers/ drivers/ | +7 | 0 replies | |
| 6/11 | iio: adc: ad7091r: Set device mode through chip_info callbackdrivers/ drivers/ drivers/ | +39 | 0 replies | |
| 7/11 | iio: adc: ad7091r: Add chip_info callback to get conversion result channeldrivers/ drivers/ drivers/ | +14 | 0 replies | |
| 8/11 | iio: adc: Split AD7091R-5 config symboldrivers/ drivers/ | +6 | 0 replies | |
| 9/11 | dt-bindings: iio: Add AD7091R-8Documentation/ | +78 | 0 replies | |
| 10/11 | iio: adc: Add support for AD7091R-8drivers/ drivers/ drivers/ +2 more | +297 | 0 replies | |
| 11/11 | MAINTAINERS: Add MAINTAINERS entry for AD7091RMAINTAINERS | +8 | 3 replies |
Reviews trailers per patch
1 of 11 patches has a Reviewed-by or Acked-by.
| Patch | Conor Dooley |
|---|---|
| 1/11 | |
| 2/11 | |
| 3/11 | |
| 4/11 | |
| 5/11 | |
| 6/11 | |
| 7/11 | |
| 8/11 | |
| 9/11 | R-b |
| 10/11 | |
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 00/11] Add support for AD7091R-2/-4/-8
From: Marcelo Schmitt <[email protected]>
----------------- Updates -----------------
Applied all suggestions.
Only submitting patches not applied on v4:
Patches after ("Align arguments to function call parenthesis").
Change log v4 -> v5:
- Patch 1: Event callbacks
* Moved to begin of the series to easy backport;
* Reverted to original event attributes;
* Reworked event configuration to do per direction per channel enable/disable;
* Improved commit message;
* Added fixes tag;
* Added Suggested-by tag.
- Patch 2: Enable internal vref
* Added fixes tag and improved commit message;
* Now earlier in the series to easy backport;
* Used regmap_set_bits() to make code more neat.
- Patch 3: Move generic AD7091R code
* event specs moved earlier in patch 1.
- Patch 4: Move chip init data
* Renamed field to make initialization clearer: irq_info -> info_irq.
* Fixed ad7091r_init_info initialization by passing pointers to info structs;
- Patch 10: Add ad7091r8 support
* Moved bitfield.h include to patch event callbacks patch;
* Dropped GPIO consumer include on ad7091r-base.h and added gpio_desc;
* Removed extra space before devm_gpiod_get_optional().
So, since we are already fixing a few things here, maybe it's a good time to comment about the event ABI.
I see the event config files under events directory appearing as in_voltage0_thresh_falling_valuein_voltage0_thresh_rising_valuein_voltage1_thresh_falling_value
and so on.
They don't have the _raw part of the name as documented in the IIO ABI [1]. Not sure if that is how it's intended to be, the driver is still missing something, or maybe ABI is somehow outdated.
Anyway, if that is also something to be fixed then let me know I'll have a look at it.
Thanks,
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.
Marcelo Schmitt (11):
iio: adc: ad7091r: Allow users to configure device events
iio: adc: ad7091r: Enable internal vref if external vref is not
supplied
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: 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
.../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 | 269 +++++++++++------ drivers/iio/adc/ad7091r-base.h | 83 +++++- drivers/iio/adc/ad7091r5.c | 120 ++++---- drivers/iio/adc/ad7091r8.c | 272 ++++++++++++++++++ 8 files changed, 714 insertions(+), 140 deletions(-) create mode 100644 drivers/iio/adc/ad7091r8.c
Signature · 1 line
2.42.0