Skip to content

iio: adc: add new ad7380 driver

David Lechner linux-devicetree linux-iio lkml 4 versions – In review

Get series with b4
b4 am [email protected] change-id 20231208-ad7380-mainline-e6c4fa7dbedd

Versions newest first

  1. v4 Latest2 patches 7 repliesIn review
  2. v33 patches 12 repliesSuperseded
  3. v23 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches8 repliesSuperseded

Changes in v4 from the cover letter

- Dropped SPI bindings patch.
- Removed spi-rx-bus-channels from the adi,ad7380 bindings.
- Link to v3: https://lore.kernel.org/r/[email protected]

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: iio: adc: Add binding for AD7380 ADCsDocumentation/devicetree/bindings/iio/adc/adi,ad7380.yaml MAINTAINERS+95 -01 reply
2/2iio: adc: ad7380: new driver for AD7380 ADCsMAINTAINERS drivers/iio/adc/Kconfig drivers/iio/adc/Makefile +1 more+480 -05 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchNuno SaConor Dooley
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] iio: adc: add new ad7380 driver

This series is adding a new driver for the Analog Devices Inc. AD7380, AD7381, AD7383, and AD7384 ADCs. These chips are part of a family of simultaneous sampling SAR ADCs.

One quirk of these chips is that since they are simultaneous sampling, they have multiple SPI data output lines that allow transferring two data words (one for each input channel) at the same time. So a new generic devicetree binding is added to describe this sort of SPI bus configuration.

To keep things simple, the initial driver implementation only supports the 2-channel differential chips listed above. There are also 4-channel differential chips and 4-channel single-ended chips in the family that can be added later.

Furthermore, the driver is just implementing basic support for capturing data. Additional features like interrupts, CRC, etc. can be added later.

Also, FYI, this driver will also be used as the base for an upcoming series adding AXI SPI Engine offload support for these chips along with [1].

This work is being done by BayLibre and on behalf of Analog Devices Inc. hence the maintainers are @analog.com.

[1]: https://lore.kernel.org/linux-spi/[email protected]/

---
Changes in v4:
- Dropped SPI bindings patch.
- Removed spi-rx-bus-channels from the adi,ad7380 bindings.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- dt-bindings:
- Picked up Conor's Reviewed-By on the adi,ad7380 bindings
- driver:
- Removed extra indent in DEFINE_AD7380_DIFFERENTIAL_2_CHANNEL macro
- Removed scan mask that included timestamp channel
- Removed parent device assignment
- Picked up Nuno's Reviewed-by
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- dt-bindings:
- Added new patch with generic spi-rx-bus-channels property
- Added maxItems to reg property
- Replaced adi,sdo-mode property with spi-rx-bus-channels
- Made spi-rx-bus-channels property optional with default value of 1
(this made the if: check more complex)
- Changed example to use gpio for interrupt
- driver:
- Fixed CONFIG_AD7380 in Makefile
- rx_buf = st->scan_data.raw instead of rx_buf = &st->scan_data
- Moved iio_push_to_buffers_with_timestamp() outside of if statement
- Removed extra blank lines
- Renamed regulator disable function
- Dropped checking of adi,sdo-mode property (regardless of the actual wiring, we can always use 1-wire mode)
- Added available_scan_masks
- Added check for missing driver match data
- Link to v1: https://lore.kernel.org/r/[email protected]

---
David Lechner (2):
dt-bindings: iio: adc: Add binding for AD7380 ADCs
iio: adc: ad7380: new driver for AD7380 ADCs

 .../devicetree/bindings/iio/adc/adi,ad7380.yaml    |  86 ++++
 MAINTAINERS                                        |  10 +
 drivers/iio/adc/Kconfig                            |  16 +
 drivers/iio/adc/Makefile                           |   1 +
 drivers/iio/adc/ad7380.c                           | 462 +++++++++++++++++++++
 5 files changed, 575 insertions(+)

---
base-commit: 18f78b5e609b19b56237f0dae47068d44b8b0ecd
change-id: 20231208-ad7380-mainline-e6c4fa7dbedd

Best regards,

Signature · 1 line
David Lechner <[email protected]>