From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Linus Walleij" <linusw@kernel.org>,
"Bartosz Golaszewski" <brgl@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, "Chris Hall" <c-hall@ti.com>,
"Patrick Edwards" <pedwards@ti.com>,
"Kurt Borja" <kuurtb@gmail.com>
Subject: Re: [PATCH] iio: adc: ti-ads112c14: add gpio support
Date: Thu, 15 Oct 2026 16:22:35 +0300 [thread overview]
Message-ID: <atDTmxEp2KmTRUYf@ashevche-desk.local> (raw)
In-Reply-To: <f8b97c1c-7dae-4eea-9d64-c2c81ab4ef49@baylibre.com>
On Thu, Oct 15, 2026 at 08:00:04AM -0500, David Lechner wrote:
> On 10/13/26 9:03 AM, Andy Shevchenko wrote:
> > 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?
>
> I want to match the datasheet pin name.
I see. Sounds like we might need something more universal for
devm_kasprintf_strarray(). (Yeah, I understand that that is out
of the scope of your series.)
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-10-15 13:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 21:50 David Lechner (TI)
2026-09-26 0:46 ` Jonathan Cameron
2026-10-09 23:14 ` David Lechner
2026-09-28 8:36 ` Andy Shevchenko
2026-10-09 23:04 ` David Lechner
2026-10-13 14:03 ` Andy Shevchenko
2026-10-15 13:00 ` David Lechner
2026-10-15 13:22 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atDTmxEp2KmTRUYf@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=brgl@kernel.org \
--cc=c-hall@ti.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kuurtb@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pedwards@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®