[PATCH 0/6] iio: adc: drop platform data from some ADI ADC drivers
From: Nuno Sá
Date: Wed Nov 25 2026 - 05:20:58 EST
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.
---
Nuno Sá (6):
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: add firmware support and drop platform data
.../devicetree/bindings/iio/adc/adi,ad7793.yaml | 236 +++++++++++++++
MAINTAINERS | 9 +
drivers/iio/adc/ad7266.c | 58 ++--
drivers/iio/adc/ad7791.c | 26 +-
drivers/iio/adc/ad7793.c | 315 ++++++++++++++++++---
drivers/iio/adc/ad7887.c | 15 +-
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, 575 insertions(+), 284 deletions(-)
---
base-commit: b70566610b48ba49dec636019da4d696db64b085
change-id: 20261111-iio-adi-legacy-platdata-63eaa0e33063
--
Thanks!
- Nuno Sá