Re: [PATCH 4/4] iio: adc: Add the PocketGo S30 analog stick MCU

From: Romain TISSERAND

Date: Sat Nov 28 2026 - 11:29:27 EST


Hi Jonathan,

> I'd guess this is swapping ends of the pot to detect shorts or broken
> connections? That has to be on consecutive samples.

Most likely a transfer check: the MCU sends each value followed by its
one's complement. They come from consecutive samples, as you say: they
differ by a count or two at rest and more while the stick moves fast.
The comment says so; I'll make it clearer in v2.

> Does this actually happen? It is fairly unusual for a recv to fail.

I have not seen a short read in testing; the retry exists for the
complement mismatch. In v2 a short read will be a plain error, no
retry.

The rest (loop variables, state in iio_priv() instead of drvdata,
named initializer) will be in v2, whichever subsystem it ends up in
(see my answer on the cover letter).

Thanks,
Romain