Re: [PATCH v3 2/2] iio: adc: Add a driver for the Ingenic X1600 ADC
From: Joshua Crofts
Date: Mon Oct 26 2026 - 06:16:51 EST
On Mon, 26 Oct 2026 09:36:31 +0100
Olivier Louvignes <olivier@xxxxxxxxx> wrote:
> The X1600's SAR ADC has four auxiliary channels, each with its own start
> bit, interrupt flag and 12-bit result, and none of the touchscreen or
> battery engines of the JZ47xx ADCs that ingenic-adc drives. Add a small
> driver that exposes the four channels as voltages against the 3.3 V
> reference.
>
> The registers are in chapter 19 of the X1600 programming manual. The
> ADC clock divider is even, as the manual has it (an odd value divides
> by one less); the vendor kernel writes the divider minus one, which
> gives a slightly faster clock than it asks for.
>
> Tested on a HiBy R1, whose play/pause and volume keys sit on channel 0
> behind adc-keys: all three read and report correctly.
>
> Signed-off-by: Olivier Louvignes <olivier@xxxxxxxxx>
> ---
The driver looks good to me now!
Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
--
Kind regards,
Joshua Crofts