From: "Siratul Islam" <siratul.islam@linux.dev>
To: "Jonathan Cameron" <jic23@kernel.org>,
linux-iio@vger.kernel.org, linux@analog.com,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Radu Sabau" <radu.sabau@analog.com>,
"Song Qiang" <songqiang1304521@gmail.com>,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Alisa-Dariana Roman" <alisa.roman@analog.com>,
"Ramona Bolboaca" <ramona.bolboaca@analog.com>,
"Jean-Baptiste Maneyrol" <jean-baptiste.maneyrol@tdk.com>
Cc: "Jonathan Cameron" <jonathan.cameron@oss.qualcomm.com>
Subject: Re: [PATCH 07/15] iio: proximity: vl53l1x-i2c: use iio_trigger_set_default_immutable()
Date: Mon, 30 Nov 2026 14:06:53 +0000 [thread overview]
Message-ID: <6f5af4f65c7b590c2da5c13c9d9a1acfec79aebb@linux.dev> (raw)
In-Reply-To: <20261130-messing-immutable3323-v1-7-f44aa3082603@oss.qualcomm.com>
November 30, 2026 at 6:13 AM, "Jonathan Cameron" <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
>
> Use iio_trigger_set_default_immutable() rather than taking a reference
> to the trigger in probe(). The IIO core now takes the reference during
> iio_device_register(), so it is not leaked if probe() fails after the
> trigger is set up.
>
> The driver only accepts its own trigger, using iio_validate_own_trigger()
> to enforce that. An immutable trigger gives the same guarantee, so drop
> the callback.
>
> Potential userspace ABI impact. Previously the trigger could be cleared
> by writing an empty string, or any name that is not a registered trigger,
> to current_trigger. That now fails with -EPERM, as does selecting a
> different trigger, which previously failed with -EINVAL. Writing the
> name of the current trigger still succeeds. It is possible some userspace
> relies on the teardown behaviour though that userspace would be broken
> for existing immutable triggers.
>
> Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
> ---
Reviewed-by: Siratul Islam <siratul.islam@linux.dev>
>
...
>
> --
> 2.56.1
>
next prev parent reply other threads:[~2026-11-30 14:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 0:13 [PATCH 00/15] IIO: Immutable triggers. Close leaks in registration and use more widely Jonathan Cameron
2026-11-30 0:13 ` [PATCH 01/15] iio: core: add iio_trigger_set_default_immutable() Jonathan Cameron
2026-11-30 0:13 ` [PATCH 02/15] iio: adc: dln2-adc: use iio_trigger_set_default_immutable() Jonathan Cameron
2026-11-30 0:13 ` [PATCH 03/15] iio: core: allow writing the current trigger when it is immutable Jonathan Cameron
2026-11-30 0:13 ` [PATCH 04/15] iio: adc: ad7606: use iio_trigger_set_default_immutable() Jonathan Cameron
2026-11-30 0:13 ` [PATCH 05/15] iio: adc: ad4691: " Jonathan Cameron
2026-11-30 0:13 ` [PATCH 06/15] iio: proximity: vl53l0x-i2c: " Jonathan Cameron
2026-11-30 14:06 ` Siratul Islam
2026-11-30 0:13 ` [PATCH 07/15] iio: proximity: vl53l1x-i2c: " Jonathan Cameron
2026-11-30 14:06 ` Siratul Islam [this message]
2026-11-30 0:13 ` [PATCH 08/15] iio: humidity: hts221: use iio_dev->trig in iio_trigger_notify_done() Jonathan Cameron
2026-11-30 8:20 ` Lorenzo Bianconi
2026-11-30 0:13 ` [PATCH 09/15] iio: humidity: hts221: use iio_trigger_set_default_immutable() Jonathan Cameron
2026-11-30 8:21 ` Lorenzo Bianconi
2026-11-30 0:13 ` [PATCH 10/15] iio: adc: ad_sigma_delta: use an immutable default trigger Jonathan Cameron
2026-11-30 0:13 ` [PATCH 11/15] iio: adc: ad_sigma_delta: drop ad_sd_validate_trigger() Jonathan Cameron
2026-11-30 0:13 ` [PATCH 12/15] iio: imu: inv_mpu6050: use iio_trigger_set_default_immutable() Jonathan Cameron
2026-11-30 0:13 ` [PATCH 13/15] iio: core: add devm_iio_trigger_set_immutable() Jonathan Cameron
2026-11-30 0:13 ` [PATCH 14/15] iio: potentiostat: lmp91000: use devm managed probe Jonathan Cameron
2026-11-30 0:13 ` [PATCH 15/15] iio: potentiostat: lmp91000: undo immutable trigger on unbind Jonathan Cameron
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=6f5af4f65c7b590c2da5c13c9d9a1acfec79aebb@linux.dev \
--to=siratul.islam@linux.dev \
--cc=Michael.Hennerich@analog.com \
--cc=alisa.roman@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=jic23@kernel.org \
--cc=jonathan.cameron@oss.qualcomm.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux@analog.com \
--cc=lorenzo@kernel.org \
--cc=nuno.sa@analog.com \
--cc=radu.sabau@analog.com \
--cc=ramona.bolboaca@analog.com \
--cc=songqiang1304521@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.