Re: [PATCH v2 2/2] iio: adc: ti-ads112c14: add gpio support

From: Andy Shevchenko

Date: Tue Oct 13 2026 - 11:21:55 EST


On Fri, Oct 09, 2026 at 06:25:52PM -0500, David Lechner (TI) wrote:
> Add support for using the AIN4/GPIO0 to AIN7/GPIO3 pins as GPIOs when
> the gpio-controller property is present.
>
> Pins that are already used for something else according to the
> devicetree are excluded from the valid GPIO mask. This includes analog
> inputs and excitation current outputs used by channels, REFP/REFN when
> an external reference is used, the /FAULT and /DRDY interrupts and the
> external clock input.

...

> + for (unsigned int i = 0; i < ADS112C14_NUM_GPIO; i++) {
> + data->gpio_names[i] = devm_kasprintf(dev, GFP_KERNEL, "%s:GPIO%u",
> + dev_name(&indio_dev->dev), i);
> + if (!data->gpio_names[i])
> + return -ENOMEM;
> + }

I am sorry, I still didn't get what's wrong with the dash (technically
speaking)? So, this may use devm_kasprintf_strarray().

--
With Best Regards,
Andy Shevchenko