Re: [PATCH v2 2/2] iio: adc: ti-ads112c14: add gpio support
From: David Lechner
Date: Thu Oct 15 2026 - 09:12:38 EST
On 10/13/26 9:07 AM, Andy Shevchenko wrote:
> 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().
>
Nothing technical per say. I just want it to match the datasheet pin name
without the extra character in the middle of it.