Re: [PATCH] iio: adc: ti-ads112c14: add gpio support
From: Andy Shevchenko
Date: Tue Oct 13 2026 - 10:50:14 EST
On Fri, Oct 09, 2026 at 06:04:21PM -0500, David Lechner wrote:
> On 9/28/26 3:36 AM, Andy Shevchenko wrote:
> > On Fri, Sep 25, 2026 at 04:50:47PM -0500, David Lechner (TI) wrote:
...
> >> +static int ads112c14_gpio_init(struct iio_dev *indio_dev)
> >> +{
> >> + struct ads112c14_data *data = iio_priv(indio_dev);
> >> + struct device *dev = indio_dev->dev.parent;
> >> +
> >> + 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;
> >
> > Wondering if you can utilise devm_kasprintf_strarray().
> >
> That uses "%s-%zu" internally, so would add a "-" where I don't want it.
What's the problem with a dash?
--
With Best Regards,
Andy Shevchenko