From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Aleksandrs Vinarskis <alex@vinarskis.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] iio: st_sensors: fix trigger allocation
Date: Mon, 2 Mar 2026 10:15:06 +0200 [thread overview]
Message-ID: <aaVHCueMg4fBtypt@ashevche-desk.local> (raw)
In-Reply-To: <20260228-st-iio-trigger-v1-1-abf5909e547f@vinarskis.com>
On Sat, Feb 28, 2026 at 06:11:02PM +0100, Aleksandrs Vinarskis wrote:
> Current hardcoded name prevents adding multiple st-sensors devices
> on the same platform. Fix by aligning trigger name with other drivers.
...
> - sdata->trig = devm_iio_trigger_alloc(parent, "%s-trigger",
> - indio_dev->name);
> + sdata->trig = devm_iio_trigger_alloc(parent, "%s-dev%d",
> + indio_dev->name,
> + iio_device_id(indio_dev));
I think you need to split this to more complex approach, id est:
- register the first one as with the current name
- use indexed variant for the rest
It will give something like %s-trigger, %s-trigger1 (if start from 0),
and so on. This way you won't break user space when it was defined for
a single trigger.
(Yes, I have read all emails in this thread as of time of replying to it.)
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-03-02 8:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 17:11 [PATCH] iio: st_sensors: fix trigger allocation Aleksandrs Vinarskis
2026-02-28 19:22 ` David Lechner
2026-03-01 10:50 ` Aleksandrs Vinarskis
2026-03-01 11:30 ` Jonathan Cameron
2026-03-01 13:05 ` Greg KH
2026-03-02 8:15 ` 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=aaVHCueMg4fBtypt@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=alex@vinarskis.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=stable@vger.kernel.org \
/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