[PATCH v3 0/2] iio: adc: Add the Ingenic X1600 ADC

From: Olivier Louvignes

Date: Mon Oct 26 2026 - 04:39:36 EST


A driver for the SAR ADC of the Ingenic X1600: four auxiliary channels,
12 bits, one interrupt per channel. Tested on a HiBy R1, whose keys are on
channel 0 behind adc-keys.

By their programming manuals, the X1830 (3 channels, 10 bits) and the
X2000 (5 channels, 10 bits, one more data register) have the same
register layout, two results to a data register. As Jonathan said on v2,
the X1600 name stays, and supporting them now is welcome but not
required: I have neither to test on, so this version is X1600-only, and
a chip_info with the channel count and the resolution can add them
later. Nikolaus, if Letux has either at hand, adding them on top with a
test would be welcome.

Changes since v2:
- Cover letter (Andy, Joshua).
- MAINTAINERS: no list line; the binding's path in patch 1, the driver's
in patch 2 (Joshua).
- Includes for what the driver uses, copyright line, MODULE_AUTHOR(),
reverse xmas tree, open-coded return, no message after
devm_request_irq(), a blank line (Joshua; Andy on the return).
- fsleep(2 * USEC_PER_MSEC) (Andy).
- The ADC clock divider is now even, as the X1600 programming manual
has it; v2 wrote the divider minus one, as the vendor kernel does. The
divider fields are named as in the manual, and the two clocks only
repeated sampling uses stay at their reset values.
- The probe comment on staying powered up no longer names the keys
(Jonathan).

v2: https://lore.kernel.org/all/20261024041357.34346-1-olivier@xxxxxxxxx/

Olivier Louvignes (2):
dt-bindings: iio: adc: Add the Ingenic X1600 ADC
iio: adc: Add a driver for the Ingenic X1600 ADC

.../bindings/iio/adc/ingenic,x1600-adc.yaml | 60 +++++
MAINTAINERS | 6 +
drivers/iio/adc/Kconfig | 10 +
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/ingenic-x1600-adc.c | 242 ++++++++++++++++++
5 files changed, 319 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/ingenic,x1600-adc.yaml
create mode 100644 drivers/iio/adc/ingenic-x1600-adc.c


base-commit: a3b3580713f3ac5a32dc2874ee546828977a1d68
--
2.39.5