[PATCH v2] iio: adc: sun20i-gpadc: support non-contiguous channel lookups
Andy Shevchenko
andriy.shevchenko at intel.com
Fri May 15 02:26:55 PDT 2026
On Thu, May 14, 2026 at 05:19:34AM +0200, Michal Piekos wrote:
> Using consumer driver like iio-hwmon which resolve channels thorugh
> io-channels phandles will fail for sparse channels because IIO core by
> default threats phandle argument as index into channel array.
> eg. <&gpadc 1> will fail if there is only channel at 1 specified
>
> Add .fwnode_xlate() which maps DT phandle to the registered channel
> whose chan->channel matches the hardware channel number. It allows
> sparse channel maps to be consumed by drivers like iio-hwmon.
>
> Tested on Radxa Cubie A5E.
Reviewed-by: Andy Shevchenko <andriy.shevchenko at intel.com>
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list