Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v2 00/11] iio: adc: drop platform data from some ADI ADC drivers
@ 2026-12-02 17:05 Nuno Sá
  2026-12-02 17:05 ` [PATCH v2 01/11] iio: adc: ad7887: fix on-chip reference enable logic Nuno Sá
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: Nuno Sá @ 2026-12-02 17:05 UTC (permalink / raw)
  To: linux-iio, linux-kernel, devicetree
  Cc: linux, Michael Hennerich, Jonathan Cameron, David Lechner,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Jonathan Cameron, stable, Joshua Crofts,
	Andy Shevchenko

The ad7266, ad7887, ad7791 and ad7793 drivers can still only be
configured through platform data headers, and nothing in tree uses them
anymore. This series removes them.

The ad7266, ad7887 and ad7791 drivers already work without platform
data, so the headers are just dropped and the drivers keep the
configuration they use today when no platform data is given. The
ad7793 driver refuses to probe without platform data, so it gets a
binding and firmware properties instead.

Patch 1 fixes an issue in ad7887 found while looking at the driver: the
on-chip reference gets disabled exactly when the driver relies on it.

For ad7266 and ad7887, the code for the modes that could only be
selected through platform data (address GPIOs, other sample modes and
input range on ad7266, dual channel mode on ad7887) is kept, so that
someone needing it can easily add firmware properties for it. I'm likely
being optimistic and odds are it will be just dead code so I'm glad to
drop all of it if that's the feedback I get.

I also want to keep changes to a minimal to not end up with big
refactors.

This series was also prepared with the help of AI tools.

Changes in v2:
- Patch 1:
  - Add Cc: stable tag.
- Patch 2:
  - Drop the confusing platform data reference from the comment.
- Patch 3:
  - Same comment change as in patch 2.
- Patch 4:
  - Reflow the commit message.
- Patch 5:
  - Reference bipolar from adc.yaml instead of redefining it.
  - Rename adi,buffer-disable to adi,low-source-impedance, so that it
    describes the hardware instead of a software action.
  - Drop adi,burnout-currents-enable. Burnout currents are meant for
    diagnostics, not normal operation.
  - Place clocks before interrupts.
- Patches 6-11 (patch 6 in v1):
  - Split into smaller patches as suggested by Andy and Jonathan.
  - Patch 6 (new): get the chip info with spi_get_device_match_data(),
    which does not rely on an SPI device id match and prepares for the
    OF match table.
  - Patch 7 (new): enable the AVDD and DVDD supplies on its own.
  - Patch 10 (new): drop burnout current support. It can be exposed
    later (e.g. via debugfs) if there's interest.
  - Patch 11: follow the binding changes and allow longer lines where
    it helps readability.
- Link to v1: https://patch.msgid.link/20261125-iio-adi-legacy-platdata-v1-0-54e4c8830b57@analog.com

---
Nuno Sá (11):
      iio: adc: ad7887: fix on-chip reference enable logic
      iio: adc: ad7887: drop platform data support
      iio: adc: ad7266: drop platform data support
      iio: adc: ad7791: drop platform data support
      dt-bindings: iio: adc: add AD7793 and similar ADCs
      iio: adc: ad7793: use spi_get_device_match_data()
      iio: adc: ad7793: enable the AVDD and DVDD supplies
      iio: adc: ad7793: move platform data definitions into the driver
      iio: adc: ad7793: rename platform data to config
      iio: adc: ad7793: drop burnout current support
      iio: adc: ad7793: add firmware support

 .../devicetree/bindings/iio/adc/adi,ad7793.yaml    | 228 ++++++++++++++
 MAINTAINERS                                        |   9 +
 drivers/iio/adc/ad7266.c                           |  57 +++-
 drivers/iio/adc/ad7791.c                           |  26 +-
 drivers/iio/adc/ad7793.c                           | 341 ++++++++++++++++++---
 drivers/iio/adc/ad7887.c                           |  14 +-
 include/linux/platform_data/ad7266.h               |  50 ---
 include/linux/platform_data/ad7791.h               |  18 --
 include/linux/platform_data/ad7793.h               | 111 -------
 include/linux/platform_data/ad7887.h               |  21 --
 10 files changed, 578 insertions(+), 297 deletions(-)
---
base-commit: fba506008a5b548ad2708bc2765a039cb00a47ab
change-id: 20261111-iio-adi-legacy-platdata-63eaa0e33063
--

Thanks!
- Nuno Sá


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-12-03 17:33 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 17:05 [PATCH v2 00/11] iio: adc: drop platform data from some ADI ADC drivers Nuno Sá
2026-12-02 17:05 ` [PATCH v2 01/11] iio: adc: ad7887: fix on-chip reference enable logic Nuno Sá
2026-12-03 11:54   ` Andy Shevchenko
2026-12-02 17:05 ` [PATCH v2 02/11] iio: adc: ad7887: drop platform data support Nuno Sá
2026-12-03 11:56   ` Andy Shevchenko
2026-12-02 17:05 ` [PATCH v2 03/11] iio: adc: ad7266: " Nuno Sá
2026-12-03 11:57   ` Andy Shevchenko
2026-12-02 17:05 ` [PATCH v2 04/11] iio: adc: ad7791: " Nuno Sá
2026-12-02 17:05 ` [PATCH v2 05/11] dt-bindings: iio: adc: add AD7793 and similar ADCs Nuno Sá
2026-12-02 17:05 ` [PATCH v2 06/11] iio: adc: ad7793: use spi_get_device_match_data() Nuno Sá
2026-12-03 16:37   ` Andy Shevchenko
2026-12-02 17:05 ` [PATCH v2 07/11] iio: adc: ad7793: enable the AVDD and DVDD supplies Nuno Sá
2026-12-03 17:03   ` Andy Shevchenko
2026-12-02 17:05 ` [PATCH v2 08/11] iio: adc: ad7793: move platform data definitions into the driver Nuno Sá
2026-12-03 17:02   ` Andy Shevchenko
2026-12-02 17:05 ` [PATCH v2 09/11] iio: adc: ad7793: rename platform data to config Nuno Sá
2026-12-03 17:26   ` Andy Shevchenko
2026-12-02 17:05 ` [PATCH v2 10/11] iio: adc: ad7793: drop burnout current support Nuno Sá
2026-12-03 17:33   ` Andy Shevchenko
2026-12-02 17:05 ` [PATCH v2 11/11] iio: adc: ad7793: add firmware support Nuno Sá

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox