mbox series

[v3,0/2] iio: adc: ti-ads1119: Add driver

Message ID 20240617183215.4080-1-francesco@dolcini.it (mailing list archive)
Headers show
Series iio: adc: ti-ads1119: Add driver | expand

Message

Francesco Dolcini June 17, 2024, 6:32 p.m. UTC
From: Francesco Dolcini <francesco.dolcini@toradex.com>

The ADS1119 is a precision, 16-bit, analog-to-digital converter (ADC)
that features two differential or four single-ended inputs through a
flexible input multiplexer (MUX), rail-to-rail input
buffers, a programmable gain stage, a voltage reference, and an
oscillator.

Apart from normal single conversion, the driver also supports
continuous conversion mode using a triggered buffer. However, in this
mode only one channel can be scanned at a time.

v3:
 bindings:
 - add avdd and dvdd supplies
 - add Reviewed-by: Conor Dooley <conor.dooley@microchip.com

 driver:
 - add MICRO constant on necessary places 
 - add devm_regulator_bulk_get_enable() to handle avdd/dvdd supplies
 - add power down action with devm_add_action_or_reset()
 - add buffer setup functions
 - add iio_validate_scan_mask_onehot() to guarantee only one scan channels
 - add support to other triggers than only the adc irq
 - add device check to adc irq trigger to guarantee associating it only its own device
 - add a cached value for the config register
 - change ads1119_get_hw_datarate() return  
 - change return location in read_raw() and write_raw() 
 - change return location in ads1119_read_data() 
 - change the scan buf to a local struct with correct size and alignment
 - change ads1119_update_config_reg() to ads1119_upd_cfg_reg()
 - fix over wrap in read_poll_timeout() 
 - remove unnecessary goto label in ads1119_single_conversion() 
 - remove unnecessary empty lines 
 - remove scan mask from the driver state
 - remove ads1119_validate_gain() and call it inline in write_raw()
 - remove all ads1119_cmd functions and use i2c_smbus inline

v2: https://lore.kernel.org/all/20240606163529.87528-1-francesco@dolcini.it/
 bindings:
 - add diff-channels and single-channel
 - remove ti,gain and ti,datarate
 - more details on the patch changelog

 driver:
 - adaptation for the binding changes
 - changed i2c read/write to the device (not using regmap anymore, use FIELD macros)
 - more details on the patch changelog

v1: https://lore.kernel.org/all/20240527154050.24975-1-francesco@dolcini.it/

João Paulo Gonçalves (2):
  dt-bindings: iio: adc: add ti,ads1119
  iio: adc: ti-ads1119: Add driver

 .../bindings/iio/adc/ti,ads1119.yaml          | 155 ++++
 MAINTAINERS                                   |   8 +
 drivers/iio/adc/Kconfig                       |  12 +
 drivers/iio/adc/Makefile                      |   1 +
 drivers/iio/adc/ti-ads1119.c                  | 839 ++++++++++++++++++
 5 files changed, 1015 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml
 create mode 100644 drivers/iio/adc/ti-ads1119.c