[PATCH v8 00/12] iio: adc: Add support for AD4170 series of ADCs

Marcelo Schmitt posted 12 patches 3 months ago
Documentation/ABI/testing/sysfs-bus-iio       |    1 +
.../bindings/iio/adc/adi,ad4170-4.yaml        |  554 +++
MAINTAINERS                                   |    8 +
drivers/iio/adc/Kconfig                       |   16 +
drivers/iio/adc/Makefile                      |    1 +
drivers/iio/adc/ad4170-4.c                    | 3027 +++++++++++++++++
6 files changed, 3607 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml
create mode 100644 drivers/iio/adc/ad4170-4.c
[PATCH v8 00/12] iio: adc: Add support for AD4170 series of ADCs
Posted by Marcelo Schmitt 3 months ago
Hi,

AD4170-4 v8 most significant differences from v7 is the timestamp patch comes
earlier in the series and struct ad4170_state fields have been rearranged
to better align to cache line boundaries.

Jonathan, I see you have applied v7 to testing. Thank you. Though, if still
possible to pick v8 instead, that will provide patches with fewer line removals.
Totally fine if you prefer to keep v7, though.

Thank you to all reviewers of previous versions.

v8 has:

Patch 1 adds device tree documentation for the parts.
Patch 2 adds basic device support.
Patch 3 adds support for calibration scale.
Patch 4 adds support for calibration bias.
Patch 5 adds sinc5+avg to filter_type_available IIO ABI documentation.
Patch 6 adds support for sample frequency along with filter type configuration.
Patch 7 adds support for buffered ADC reading.
Patch 8 (was patch 12 on v7) adds timestamp channel
Patch 9 adds clock provider support
Patch 10 adds GPIO controller support.
Patch 11 adds internal temperature sensor support.
Patch 12 adds support for external RTD and bridge circuit sensors.

Despite the updates, no functional change has been made in v8.
This patch series was generated using the "histogram diff" algorithm
(git format-patch --histogram option).

Change log v7 -> v8

[Generic changes]
- Update patches to make struct ad4170_state fields align well with both 32
  and 64-bit size cache lines after all patches are applied.

[Device tree changes]
- Updated device name in patch description (AD4170 -> AD4170-4).
- Removed extra blank line at the end of the doc.

[Basic driver patch]
- Early declare and use sensor type local variable to reduce diff in ext sensor patch.
- Make early check of IIO chan type to reduce diff in temperature support patch.
- Dropped 'int_pin_sel' field from struct ad4170_state. int_pin_sel is now local.
- Renamed AD4170_MAX_CHANNELS -> AD4170_MAX_ADC_CHANNELS for better readability.

[Timestamp channel patch]
- Moved from end of the series to right after buffer support patch.
- Reworked timestamp patch so it doesn't add 'num_adc_chans' field to struct ad4170_state.

[Internal temperature sensor patch]
- Reduced number of line removals in code diff.

[External sensor patch]
- Reworded external sensor support patch description.
- Reduced number of line removals in code diff.
- Updated ad4170_parse_external_sensor() param: u8 s_type -> unsigned int s_type.


Link to v7: https://lore.kernel.org/linux-iio/cover.1751289747.git.marcelo.schmitt@analog.com/
Link to v6: https://lore.kernel.org/linux-iio/cover.1750258776.git.marcelo.schmitt@analog.com/
Link to v5: https://lore.kernel.org/linux-iio/cover.1749582679.git.marcelo.schmitt@analog.com/ 
Link to v4: https://lore.kernel.org/linux-iio/cover.1748829860.git.marcelo.schmitt@analog.com/
Link to v3: https://lore.kernel.org/linux-iio/cover.1747083143.git.marcelo.schmitt@analog.com/
Link to v2: https://lore.kernel.org/linux-iio/cover.1745841276.git.marcelo.schmitt@analog.com/
Link to v1: https://lore.kernel.org/linux-iio/cover.1744200264.git.marcelo.schmitt@analog.com/


Ana-Maria Cusco (1):
  iio: adc: Add basic support for AD4170-4

Marcelo Schmitt (11):
  dt-bindings: iio: adc: Add AD4170-4
  iio: adc: ad4170-4: Add support for calibration gain
  iio: adc: ad4170-4: Add support for calibration bias
  Documentation: ABI: IIO: Add sinc5+avg to the filter_type_available
    list
  iio: adc: ad4170-4: Add digital filter and sample frequency config
    support
  iio: adc: ad4170-4: Add support for buffered data capture
  iio: adc: ad4170-4: Add timestamp channel
  iio: adc: ad4170-4: Add clock provider support
  iio: adc: ad4170-4: Add GPIO controller support
  iio: adc: ad4170-4: Add support for internal temperature sensor
  iio: adc: ad4170-4: Add support for weigh scale, thermocouple, and RTD
    sens

 Documentation/ABI/testing/sysfs-bus-iio       |    1 +
 .../bindings/iio/adc/adi,ad4170-4.yaml        |  554 +++
 MAINTAINERS                                   |    8 +
 drivers/iio/adc/Kconfig                       |   16 +
 drivers/iio/adc/Makefile                      |    1 +
 drivers/iio/adc/ad4170-4.c                    | 3027 +++++++++++++++++
 6 files changed, 3607 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml
 create mode 100644 drivers/iio/adc/ad4170-4.c


base-commit: 66ffb9f5accc6769d1ea7b9d7ac4c5ec477f9575
-- 
2.47.2
Re: [PATCH v8 00/12] iio: adc: Add support for AD4170 series of ADCs
Posted by Jonathan Cameron 3 months ago
On Mon, 7 Jul 2025 10:49:46 -0300
Marcelo Schmitt <marcelo.schmitt@analog.com> wrote:

> Hi,
> 
> AD4170-4 v8 most significant differences from v7 is the timestamp patch comes
> earlier in the series and struct ad4170_state fields have been rearranged
> to better align to cache line boundaries.
> 
> Jonathan, I see you have applied v7 to testing. Thank you. Though, if still
> possible to pick v8 instead, that will provide patches with fewer line removals.
> Totally fine if you prefer to keep v7, though.
Ok. Replaced v7 with v8.

Thanks,

J
> 
> Thank you to all reviewers of previous versions.
> 
> v8 has:
> 
> Patch 1 adds device tree documentation for the parts.
> Patch 2 adds basic device support.
> Patch 3 adds support for calibration scale.
> Patch 4 adds support for calibration bias.
> Patch 5 adds sinc5+avg to filter_type_available IIO ABI documentation.
> Patch 6 adds support for sample frequency along with filter type configuration.
> Patch 7 adds support for buffered ADC reading.
> Patch 8 (was patch 12 on v7) adds timestamp channel
> Patch 9 adds clock provider support
> Patch 10 adds GPIO controller support.
> Patch 11 adds internal temperature sensor support.
> Patch 12 adds support for external RTD and bridge circuit sensors.
> 
> Despite the updates, no functional change has been made in v8.
> This patch series was generated using the "histogram diff" algorithm
> (git format-patch --histogram option).
> 
> Change log v7 -> v8
> 
> [Generic changes]
> - Update patches to make struct ad4170_state fields align well with both 32
>   and 64-bit size cache lines after all patches are applied.
> 
> [Device tree changes]
> - Updated device name in patch description (AD4170 -> AD4170-4).
> - Removed extra blank line at the end of the doc.
> 
> [Basic driver patch]
> - Early declare and use sensor type local variable to reduce diff in ext sensor patch.
> - Make early check of IIO chan type to reduce diff in temperature support patch.
> - Dropped 'int_pin_sel' field from struct ad4170_state. int_pin_sel is now local.
> - Renamed AD4170_MAX_CHANNELS -> AD4170_MAX_ADC_CHANNELS for better readability.
> 
> [Timestamp channel patch]
> - Moved from end of the series to right after buffer support patch.
> - Reworked timestamp patch so it doesn't add 'num_adc_chans' field to struct ad4170_state.
> 
> [Internal temperature sensor patch]
> - Reduced number of line removals in code diff.
> 
> [External sensor patch]
> - Reworded external sensor support patch description.
> - Reduced number of line removals in code diff.
> - Updated ad4170_parse_external_sensor() param: u8 s_type -> unsigned int s_type.
> 
> 
> Link to v7: https://lore.kernel.org/linux-iio/cover.1751289747.git.marcelo.schmitt@analog.com/
> Link to v6: https://lore.kernel.org/linux-iio/cover.1750258776.git.marcelo.schmitt@analog.com/
> Link to v5: https://lore.kernel.org/linux-iio/cover.1749582679.git.marcelo.schmitt@analog.com/ 
> Link to v4: https://lore.kernel.org/linux-iio/cover.1748829860.git.marcelo.schmitt@analog.com/
> Link to v3: https://lore.kernel.org/linux-iio/cover.1747083143.git.marcelo.schmitt@analog.com/
> Link to v2: https://lore.kernel.org/linux-iio/cover.1745841276.git.marcelo.schmitt@analog.com/
> Link to v1: https://lore.kernel.org/linux-iio/cover.1744200264.git.marcelo.schmitt@analog.com/
> 
> 
> Ana-Maria Cusco (1):
>   iio: adc: Add basic support for AD4170-4
> 
> Marcelo Schmitt (11):
>   dt-bindings: iio: adc: Add AD4170-4
>   iio: adc: ad4170-4: Add support for calibration gain
>   iio: adc: ad4170-4: Add support for calibration bias
>   Documentation: ABI: IIO: Add sinc5+avg to the filter_type_available
>     list
>   iio: adc: ad4170-4: Add digital filter and sample frequency config
>     support
>   iio: adc: ad4170-4: Add support for buffered data capture
>   iio: adc: ad4170-4: Add timestamp channel
>   iio: adc: ad4170-4: Add clock provider support
>   iio: adc: ad4170-4: Add GPIO controller support
>   iio: adc: ad4170-4: Add support for internal temperature sensor
>   iio: adc: ad4170-4: Add support for weigh scale, thermocouple, and RTD
>     sens
> 
>  Documentation/ABI/testing/sysfs-bus-iio       |    1 +
>  .../bindings/iio/adc/adi,ad4170-4.yaml        |  554 +++
>  MAINTAINERS                                   |    8 +
>  drivers/iio/adc/Kconfig                       |   16 +
>  drivers/iio/adc/Makefile                      |    1 +
>  drivers/iio/adc/ad4170-4.c                    | 3027 +++++++++++++++++
>  6 files changed, 3607 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml
>  create mode 100644 drivers/iio/adc/ad4170-4.c
> 
> 
> base-commit: 66ffb9f5accc6769d1ea7b9d7ac4c5ec477f9575