From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.165 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796047568; b=mx+rR74RB1zv8crRFVbAGyc8Ek+AJnvm1we0twRRGiKZRNBiW4c45PCdsGfFbg4S4/uh D2P0XPQm6Hrf2M+oeYzUzjyYLjZ/1ocbyoXUy3GM51U/1FX2/NWFQZZBJ7tyd8HKeE1Lu CN618CZ43MMQNGTAAYznNzhGZfnBbe4aPp/1Dpw2NyeB6E3/BX1jSH1h1cYB4EsVqca9I I3YqnEDowAOLVyWN/Tc+jA0bBJZZoh3/D+aOx0OnEOt+y/5xkizFRXAGrjVaJwwRAVr1r 5T4SLH/rllrFc97cdfcnOAnfNTiO/2NSGxImY1LTCaZhXse0Pd7J2KfHO6Jmk6D7duQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796047568; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:MIME-Version:Date:Content-Type: Content-Transfer-Encoding:From:Message-ID:TLS-Required:Subject:To:Cc: In-Reply-To:References; bh=PwwgiZT+t4mBKFEUgrApNWt0BtGjjsSprUTDKAEVQwM=; b=Gz2oBXw8rIjbPblo5hdm1ldwhjaX1M37zOy1Hr+3cf5R5aWz6lHjC63VLFaVVqdb++6W drrGLbSOyMpZLCbJzcXYWG8Fll+C7zQkExTlkHVzY+UHa1TyRM+x0GXZ0Esu7gpnqflUn Kj85nh6MdFZf667vdbuudqAXOtlkUiM8Pagl0ZsN0p9zFeWPMdJ+qrJT3x/wU1B4taaAj bf9eenEkQUdeeDKaD+p2kNqpP6TeBoneu7OMc7LS1X9ZQrqyiRJheDyfOmrNEERqP+nAw LI7bRQs1txO9wA9AlQ+MW+5eQFzhZ+0V0EJcq4K+brtUm2pNjNGSXAALiJakrvSG+Hw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=KeRDLEAa; arc=none smtp.remote-ip=91.218.175.165 Received: from mta0.migadu.com (out-165.mta0.migadu.com [91.218.175.165]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9559A606A689 for ; Mon, 30 Nov 2026 14:06:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9559A606A689 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=KeRDLEAa X-Envelope-To: linux-iio@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=PwwgiZT+t4mBKFEUgrApNWt0BtGjjsSprUTDKAEVQwM=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796047564; v=1; x=1796652364; b=KeRDLEAaQDIadX7oRwKO2a7BBxcL3BK3yKbvCURPZSurgktPrlAWrvKCSS0NVeqIHcCtFS2d u6fk3LUylJ5aH4qQIro+AxS7MFZybVRtx0J9XSGvCQmvVXDQlLBn2XTzIQ8DxhYYbMvEF4spg8D tYKWuILoX646TELdcRbCQZ+E= X-Envelope-To: linux-iio@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 7e1c6da9fdddca74; Mon, 30 Nov 2026 14:06:04 +0000 X-Mizu-Trace-ID: 7e1c6da9fdddca74 X-Migadu-Flow: FLOW_OUT X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Date: Mon, 30 Nov 2026 14:06:04 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: "Siratul Islam" Message-ID: TLS-Required: No Subject: Re: [PATCH 06/15] iio: proximity: vl53l0x-i2c: use iio_trigger_set_default_immutable() To: "Jonathan Cameron" , linux-iio@vger.kernel.org, linux@analog.com, "David Lechner" , "=?utf-8?B?TnVubyBTw6E=?=" , "Andy Shevchenko" , "Michael Hennerich" , "Radu Sabau" , "Song Qiang" , "Lorenzo Bianconi" , "Alisa-Dariana Roman" , "Ramona Bolboaca" , "Jean-Baptiste Maneyrol" Cc: "Jonathan Cameron" In-Reply-To: <20261130-messing-immutable3323-v1-6-f44aa3082603@oss.qualcomm.com> References: <20261130-messing-immutable3323-v1-0-f44aa3082603@oss.qualcomm.com> <20261130-messing-immutable3323-v1-6-f44aa3082603@oss.qualcomm.com> November 30, 2026 at 6:13 AM, "Jonathan Cameron" wrote= : >=20 >=20From: Jonathan Cameron >=20 >=20Use iio_trigger_set_default_immutable() rather than taking a referenc= e > 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. >=20 >=20The driver only accepts its own trigger, driven by its interrupt, and > used vl53l0x_validate_trigger() to enforce that. That callback is > equivalent to iio_validate_own_trigger(). An immutable trigger > gives the same guarantee, so drop the callback. Without an interrupt no > triggered buffer is set up, so there is no current_trigger attribute an= d > the callback was never reached. >=20 >=20Potential userspace ABI impact. Previously the trigger could be clear= ed > by writing an empty string, or any name that is not a registered trigge= r, > to current_trigger. That now fails with -EPERM, as does selecting a > different trigger, which previously failed with -EINVAL. Writing the na= me > of the current trigger still succeeds. As the buffer cannot be enabled > without this trigger, clearing it served no useful purpose. > It is possible some userspace may rely on the teardown behavior even > though that would never have worked with existing immutable triggers. >=20 >=20Signed-off-by: Jonathan Cameron > --- Reviewed-by: Siratul Islam >=20 ... >=20 > --=20 >=202.56.1 >