Message ID | 20250214-eblanc-ad4630_v1-v4-0-135dd66cab6a@baylibre.com (mailing list archive) |
---|---|
Headers | show |
Series | iio: adc: ad4030: new driver for AD4030 and similar ADCs | expand |
On Fri, 14 Feb 2025 13:22:30 +0100 Esteban Blanc <eblanc@baylibre.com> wrote: > This is adding DT bindings and a new driver for AD4030, AD4630 and > AD4632 ADCs. > > This work is being done in collaboration with Analog Devices Inc., > hence they are listed as maintainers rather than me. > > The code has been tested on a Zedboard with an EVAL-AD4030-24FMCZ, > an EVAL-AD4630-24FMCZ and an EVAL-AD4630-16FMCZ. As there is no eval > board for AD4632 the support can't be tested at the moment. The main > difference is the reduced throughput. > > Signed-off-by: Esteban Blanc <eblanc@baylibre.com> Hi Esteban, Series applied to the togreg branch of iio.git with a few minor tweaks as called out in replies to the patches. I'll initially push that out as testing to let 0-day take a first look. Jonathan
This is adding DT bindings and a new driver for AD4030, AD4630 and AD4632 ADCs. This work is being done in collaboration with Analog Devices Inc., hence they are listed as maintainers rather than me. The code has been tested on a Zedboard with an EVAL-AD4030-24FMCZ, an EVAL-AD4630-24FMCZ and an EVAL-AD4630-16FMCZ. As there is no eval board for AD4632 the support can't be tested at the moment. The main difference is the reduced throughput. Signed-off-by: Esteban Blanc <eblanc@baylibre.com> --- Changes since RFC: - Reorder IIO channels to have the common byte channel next to its differential channel. - Extended names for IIO channels. - Diffrential data channels are marked as differential channels on IIO side. - Use get/put_unaligned_be24 for offset and sign extend it. - Common byte channel now has 32 realbits. This will be the same as what the FPGA will return, avoiding different channel layouts. - Fix missing newline in some error messages. - Add comment for the use of spi_sync_transfer instead of spi_write_then_read in ad4030_spi_read. - Use DMA safe buffers for regmap operations. - Clarify calculation for number of bytes to read from the device during conversion. - Formating fixes. - Add documentation page. - Link to RFC: https://lore.kernel.org/r/20240627-eblanc-ad4630_v1-v1-0-fdc0610c23b0@baylibre.com Changes since V1: The most important change is the use of the RFC's IIO channel layout as it's the most space efficient compared to the V1. In the event of a future DMA enabled version using the ADI's SPI Engine, the IIO channel layout would be different anyway. The V1 layout had a more logical ordering of the IIO channels but since we are using labels in this version, there is no reason to keep it. - Use REGMAP instead of REGMAP_SPI in Kconfig - Select IIO_TRIGGERED_BUFFER in Kconfig - Use layout with the differential channels first then the common byte channels. - Flatten rx_data union/struct layout - Use get/put_unaligned_beXX - Scale read is done without requiring direct mode - Grade check is just a warning now - Use label instead of extend names - Use IIO_VAL_INT_PLUS_NANO for gain values - Discard out of bounds values when setting oversampling ratio - Merge AD4030_OUT_DATA_MD_(16|24)_DIFF together - Use iio_chan_spec channel field to avoid maths in several places - Fix typos and formating - Link to v1: https://lore.kernel.org/r/20240822-eblanc-ad4630_v1-v1-0-5c68f3327fdd@baylibre.com Changes since V2: - Put config mode logic into regmap read/write handlers - Link to v2: https://lore.kernel.org/r/20241219-eblanc-ad4630_v1-v2-0-f36e55907bf5@baylibre.com Changes since V3: - Rebase on top of v6.14-rc2 - Fix scaling value on common mode byte channels - Remove ARRAY_SIZE in favor of sizeof on tx/rx_data - Link to v3: https://lore.kernel.org/r/20250130-eblanc-ad4630_v1-v3-0-052e8c2d897d@baylibre.com --- Esteban Blanc (6): dt-bindings: iio: adc: add ADI ad4030, ad4630 and ad4632 iio: adc: ad4030: add driver for ad4030-24 iio: adc: ad4030: add averaging support iio: adc: ad4030: add support for ad4630-24 and ad4630-16 iio: adc: ad4030: add support for ad4632-16 and ad4632-24 docs: iio: ad4030: add documentation .../devicetree/bindings/iio/adc/adi,ad4030.yaml | 111 ++ Documentation/iio/ad4030.rst | 181 +++ Documentation/iio/index.rst | 1 + MAINTAINERS | 11 + drivers/iio/adc/Kconfig | 14 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ad4030.c | 1233 ++++++++++++++++++++ 7 files changed, 1552 insertions(+) --- base-commit: a64dcfb451e254085a7daee5fe51bf22959d52d3 change-id: 20240624-eblanc-ad4630_v1-1a074097eb91 Best regards,