From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB27B356A1C for ; Mon, 2 Feb 2026 10:20:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770027626; cv=none; b=SvJragJASRozCow3W4hXG8xDQfMjWYcIQ6K0Kb8aAPatQFEO8VQHE8xOcsxJkY6ctp27JCuDFkHnqmcSoZ6ZGDykwpuoHG2LPD5XV24F1CwsSJa+9c/3ZBbrVCMT2BsEmIGYYRXn0aMBmLFNh0++/BDG9ofn3mXROzdzUEA91IQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770027626; c=relaxed/simple; bh=+F2U5AwTE3tMEzcVdzHPpXEosLjcvkikS4HveVypDNM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=O1b7bHYtbKYLUmcZtsQVgipSemHJw8TW2rGZW0XeuOLz8BcjWk2L0Qj7SYQcrmSpPebraSDg4jWeWBwe+rbCwyg7BfX244+0JkgQUkQuuQElW9oF7y2WlGyllwkzv9bavdbu8/HgvT1fo74jK9F7fG62IsyRLpwH6zm3k7TZScg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MnJvVb1b; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MnJvVb1b" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-59e17afd2d5so3527011e87.3 for ; Mon, 02 Feb 2026 02:20:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770027623; x=1770632423; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=+F2U5AwTE3tMEzcVdzHPpXEosLjcvkikS4HveVypDNM=; b=MnJvVb1bZ/U6ezSsvBz1aun1t9MArO70xu0PZEVdfWH12P+zXuHanldbbLQAZXeXt4 /hSjqnAWnmlmdvRfmx3ivFEc7ngdeXCX8OQ15SMCBANqYH0+54VM/pFdnstyOpkMisWz VMfwIvWj5JI+Ybi0l8QzxihSZQpo5/+9n5QJ11/ADlnsVtHWQTSB4UKBbwag/MWsliW3 ynWhSB9R959bmM2fxlIjfJgY7DezYTiFZ3eeT2R3YpO3WPMCBYykX8v4MmNwXAbr/ult ldwuS04fnSqw1Vqikr8j5m+KrCUZNym5FHhwjlysE7XluPOiT5gX9C3Vk3/2FkJNImka XEMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770027623; x=1770632423; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+F2U5AwTE3tMEzcVdzHPpXEosLjcvkikS4HveVypDNM=; b=a5rChxtMFHkuaINwahE+jVFxxxopbE6N16wUoKyLxkj4sCq9AlhZeQpuuaUB5yS+/R CFp8l6IhWueQS9Go2R+Psa5DK1KiMea3vLGe/EvVGe9M5BfxFg2lLyye7u0CHbA3D5FT vBqZZS14NJUnX5pKRCT0jsabpfKELbPRut0H5RZIEkc9Mos/VX2vO+wo4X0O94IirS9P VmN533cZDPuP6kNYB5DqX5u/jsSZn+oAWnn6OCjNxbaHHAve+3npmyhDtP74BGradCQO Dzm9dSEeULga9i+CcS5GF7zc5gqfqusRJxtT1MC0cGVsEiFYNQkLgl6xEbH6zaLhVbDf kInQ== X-Forwarded-Encrypted: i=1; AJvYcCX6et4Q0eY8+kSNxwuBWzZBHw5Jgg9QTrCeuwZcCupGsrwGfWyg55AeFsn1jm+p3L30IKs/PpUtsKKGcdg=@vger.kernel.org X-Gm-Message-State: AOJu0Yzisam8xkKcXwPACHIlla8QpFW0pvQVQqymlMg+NWSdg0yBsaBr TKkcYXW+iCAVijlK12w+Li1MvF+LJYGgzNgjP/Q92nRDyn2B4Nsl8yAW X-Gm-Gg: AZuq6aJA0etx7YpIaQJDXItsSN2eKygnPDn2v84T6xpNaRqqil9Yi6VH5OM7p8Io3jM RBF6VHDOgz1K6JxJu0t0SfSwwsvD4uy8qbxg463WrC8mAJPbY0gTIoTOAVor6yLD+GIc05nYRtn fdMrYU6okFx/4Qv0ZdorFtRbW7Mv1omHZ8vIBk8vfP/hXx2ntHu+Ak/RI+W+hhkvvi8rTZaxpJn 5sA0cm8OWKiNK5wE4e+mALMEzXwQVaZz15o5Uhw8I0dFT+bP5ozmv0RF2U2/M6nVF1JNcBMEz9z 306X2q0Dttt/9eZwArmTGNJysyOF7gUruRxN0XRuv7j0nv5XZ0y5vRnKN4/ma4fqWP6DeRHII2B zUapcJYvW6WDA2hACXuwf7xqNH/vvp2Je+RYR6xED+feh+e9ww2QLvqbYsWO7nLsHxo4gydlVUA oEvceGAlxe5OwCWap9LuE= X-Received: by 2002:a05:6512:2524:b0:59e:2b24:8e4f with SMTP id 2adb3069b0e04-59e2b248e7cmr655804e87.4.1770027622556; Mon, 02 Feb 2026 02:20:22 -0800 (PST) Received: from [192.168.1.187] ([148.63.225.166]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59e074bfb1esm3441242e87.96.2026.02.02.02.20.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 02:20:22 -0800 (PST) Message-ID: Subject: Re: [RFC PATCH v1 0/9] iio: Expand IIO event interface for real-world unit handling From: Nuno =?ISO-8859-1?Q?S=E1?= To: Jonathan Cameron , David Lechner Cc: Marcelo Schmitt , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org Date: Mon, 02 Feb 2026 10:21:04 +0000 In-Reply-To: <20260131184811.1e86ffa0@jic23-huawei> References: <4a04fa3f-c056-4443-a55a-e8622feb1c2a@baylibre.com> <2f9e7172885c5dd20be198f013283c6ec0513ef1.camel@gmail.com> <95b13260-0564-445d-bff7-b3b54fa15005@baylibre.com> <20260131184811.1e86ffa0@jic23-huawei> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Sat, 2026-01-31 at 18:48 +0000, Jonathan Cameron wrote: > On Wed, 21 Jan 2026 11:43:03 -0600 > David Lechner wrote: >=20 > > On 1/21/26 3:33 AM, Nuno S=C3=A1 wrote: > > > On Sun, 2026-01-18 at 14:33 -0600, David Lechner wrote:=C2=A0=20 > > > > On 1/18/26 12:18 PM, Marcelo Schmitt wrote:=C2=A0=20 > > > > > This patch set adjusts and complements the IIO event ABI docs mak= ing them > > > > > coherent with the fact that not all threshold value attributes ha= d a _raw/_input > > > > > indicator set in their names. In addition that, the latter patche= s on this > > > > > series update the IIO event infrastructure to actually enable dri= vers to provide > > > > > _input threshold value attributes.=C2=A0=20 > > > > =C2=A0 > > >=20 > > > ...=20 > > > =C2=A0=20 > > > >=20 > > > > Just throwing out an idea here without thinking about it too much..= . > > > >=20 > > > > Instead of adding a new field/parameter for units, could we extend > > > > enum iio_event_info to add IIO_EV_INFO_VALUE_RAW and IIO_EV_INFO_VA= LUE_INPUT > > > > (and same for HYSTERESIS). Really, the units only make sense for th= ese > > > > two info types anyway. > > > > =C2=A0 > > >=20 > > > Makes sense to me.=C2=A0 Or we can just document that the old value i= s _INPUT? Or just make > > > it the same value in the enum. > > >=20 > > > - Nuno S=C3=A1=C2=A0=20 > >=20 > > I don't think that works since IIO_EV_INFO_VALUE could be _RAW or _INPU= T > > depending on the driver. And another point was that this should also > > control the _raw or _input in the attribute name, and we can't change t= he > > existing attribute names. > >=20 >=20 > Fully agree with David here.=C2=A0 To fix this up we need new ABI, with > the old ABI remaining in place (including for new drivers) where the > raw or processed nature of event values is derived from whether they have > _raw or _input (and hopefully not the horrible case of both!) >=20 > The new drivers keeping this bit is the only place I might be flexible > if it is a real problem.=C2=A0 I'd still strongly prefer devices to match > the channel presentation for these but if there is a really tricky > corner case for a particular part then 'maybe' we can relax it.=C2=A0 Ups= hot > is that it won't work with standard userspace code that is old. >=20 > Not the first time we've had to add new ABI and keep the old > (whilst telling people not to use it) > The multiple buffers stuff is a good example.=20 Sure, I was not suggesting to destroy ABI. Just a suggestion for the enum := ) Yeah, I desperately need to find a proper multibuffer user for upstream. We do have some issues there... - Nuno S=C3=A1