mbox series

[v3,0/2] Add max14001 support

Message ID 20230608175517.40217-1-kimseer.paller@analog.com (mailing list archive)
Headers show
Series Add max14001 support | expand

Message

Kim Seer Paller June 8, 2023, 5:55 p.m. UTC
Hi all,

Attached link is the app note I used as reference for programming the max14001,
which I found to provide a much easier approach. You can find it here:
https://www.analog.com/media/en/technical-documentation/user-guides/guide-to-programming-the-max14001max14002-isolated-adcs--maxim-integrated.pdf

The code has been tested and is working fine with the max14001pmb and
max14001evsys boards on the Raspberry Pi 4.

Changes in v3:

max14001:
 * Replaced __cacheline_aligned with __aligned(IIO_DMA_MINALIGN).
 * Removed redundant assignment of the tx variable in the max14001_write()
 and max14001_read() functions.
 * Assigned struct device *dev with &spi->dev to improve code readability.
 * Utilized a non-regmap approach and ensure a consistent use of interface
 throughout the driver code. I attempted to use the regmap API but faced
 difficulties in implementing it due to the timing diagram requirements.
 Specifically, the need to change the chip select between transfers, which, as
 far as I know, is not applicable with regmap. While I am open to thorough
 guidance and suggestions on utilizing the regmap API, for now, I have chosen
 to stick with the non-regmap approach.

bindings:
 * Utilized the default register values, which led to the omission of some
 properties in v2. I plan to include and switch to generic values the excluded
 properties in v1 in future support.
 * Dropped the status property.
 * Moved the allOf property after the required property for better alignment.

Best Regards,
Kim Seer Paller

Kim Seer Paller (2):
  dt-bindings:iio:adc: add max14001
  iio: adc: max14001: New driver

 .../bindings/iio/adc/adi,max14001.yaml        |  54 +++
 MAINTAINERS                                   |   8 +
 drivers/iio/adc/Kconfig                       |  10 +
 drivers/iio/adc/Makefile                      |   1 +
 drivers/iio/adc/max14001.c                    | 337 ++++++++++++++++++
 5 files changed, 410 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,max14001.yaml
 create mode 100644 drivers/iio/adc/max14001.c


base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7