From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (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 BE176312824 for ; Wed, 25 Feb 2026 21:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772054828; cv=none; b=YsUNjg5ElOYUwshWx1mCzVJ4xmUvcYWm6BmewG+M+bkDfH/Po4V8f2jtc6dhTmbPAn4i7oVRNmML0rdWs/tAfQ23ZCEs/jLPs7rZRtbKrxOy+QzfCxZKIhtpXRHSgY3xNrdNMMlvXjaKyZaWs4ux7AHY7Uz7jTdWUsCt2huGts8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772054828; c=relaxed/simple; bh=mh7qnXYQkA7Ahj7W/PrVnNLs2LTGDLU5gA4Glh8Uqq0=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=qNmfhCMqg4X7g0qyIIoRPWlLuzEVXnadGDKnAGFjE00wK3x5IxTwSrOSRIb3pSjiB/CeDNJAJr7wjR6Iu2h6Dnka/uWVEWDOD8x1ALoL8/q+ViP8Mf2Ux2JPBnQ72qQJKXr3S2z7LdMUzRVItryQWhJChIONv2gwE39yfSQ+UyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=RUVhRHfi; arc=none smtp.client-ip=209.85.167.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="RUVhRHfi" Received: by mail-oi1-f173.google.com with SMTP id 5614622812f47-4645dde00a7so1658730b6e.1 for ; Wed, 25 Feb 2026 13:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1772054826; x=1772659626; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=UbuookLTgSsWfKX0tCmhPtZVpYMExZUrx5/0NdEq/IM=; b=RUVhRHfia93HZfa9g1+zkbL4Qiik6Ub8KzGhSdJl0oq6lAudLwDOS3kc1VL9hshREV H5uJq/UeKWbxxh/miIWx0papVf1+ZsjXamQunOfnO/JUpoyT6L5acKbvq00OlbdbxF8C r+g5pJmthh888OeJXX6RdbRzu7vPzD0eueZRJyl3AZWBaUv0BidvtcMOumUUVBm0EX+L JKefV51DezaKZaD0SnnvMpb8qXDaeU+KxRaLSVTdmIUeU6EtlUnESjxM0DdTYwqk3dR9 y1f2yec4qA0Gd4U6bA6JqaHcYlZpeDsYqUwSkVBCIG+5MSiM/Sx4nFY3/MEh9Uyh5yOz 43jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772054826; x=1772659626; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UbuookLTgSsWfKX0tCmhPtZVpYMExZUrx5/0NdEq/IM=; b=xSPcIuEoffndfiUXUaTxoDAU8SOcKsdupvaoNPMldpx51hcgN88V8ciwl/tMhpJa/N NuKscZjhNz1FQh6xqOrKVmKlWDMKv5TiFH55o6UOgE6t7/QN5RaXePpyHLHDoxiVRioY DTUxWsaiopEZFKnabb0IPFCWSD1iDk4kNUoZ7t2fORCLecZvrt0EMKP4Unz+WZizY4G3 oETDYeypo1No9BPOFLD8d9Z69ojkSraBn3KoztKXM9bHQy+C6WNmyzex9fBvQsIF0nWg Spxq/WucB12D7GW2iYy9fCHIQwVl4PLq1v8eFybyV/6HFeLGHAezCtw2WTPI6ohdx/XQ 9abA== X-Forwarded-Encrypted: i=1; AJvYcCWcZCNKCJyfNPVrqe/s7YJ8uDVmixFgrhJzwNWpZnTxNZdLQr5ykzf1apy6sfCuPB+UFe5GwzdlYWZT9Xo=@vger.kernel.org X-Gm-Message-State: AOJu0Yxuw8B9IU4duGVL5k4b5X9OXqYn+5FlqfF7ruJAgTs7IHZVH0fc Or3JFqY5QeH1iDymKPYUGhdA0iNfanX8voNF7WU3df0UCjEcuRF2R/LqxhDQa1M/x5Y= X-Gm-Gg: ATEYQzwLHMy4ZlGaQgC1FO11CuSJI725X2ngNfISVrFIG1QOQnl54BL/J4EZEXjNHdj meAapnSFTgNkLHnwtrEUpCximZFnKilQxT81tym3tlVgnLqxggKAcDdscjMe5/Gs3UYwXzQxQny sQnBK7GH4NQx24ENJCiZNNM5Y1SwWnqrPdVEzGSscuSkXxuCLdbO3IKyJiDTKQXBOlFqufKhy1T Nmjb+uW3cMHFMH2r1sVZqW8I8Yp6GJNPmOeCIMC6QrpO5/22ryErfOM4c6peuTm607+e+op6HO7 rY0HglEY5cuWQs+RzDdVm2/omXP0QQA2lD1bXNXAIdWR0QEsBWFZi8eDsjNa6rOEImQqRxJ/MgU I8T4EXB9TAWrcP7hq1qqdt9pQdbYvJmT27RPLDJToHJMFZXS2tl7G/3rWnqN8yBgT4RIY8CaMPG 0Te+INYuOuGZRnjyikc4+6FuZlyev+Kq+Z7E3Axde5vW2Tm8C7nNs8jxRKEX6HnNVBzPtRd4U= X-Received: by 2002:a05:6870:e310:b0:3d2:e6a7:e938 with SMTP id 586e51a60fabf-41609ea9226mr370316fac.15.1772054825834; Wed, 25 Feb 2026 13:27:05 -0800 (PST) Received: from ?IPV6:2600:8803:e7e4:500:146:def2:caeb:cb1f? ([2600:8803:e7e4:500:146:def2:caeb:cb1f]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4160cf2572bsm64198fac.2.2026.02.25.13.27.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Feb 2026 13:27:05 -0800 (PST) Message-ID: <9c0d071c-b842-47e8-87bd-4e06afec57ef@baylibre.com> Date: Wed, 25 Feb 2026 15:27:03 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 5/7] iio: ABI: Add support for floating-point numbers in buffer scan elements To: Francesco Lavra , Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Jonathan Corbet , Shuah Khan , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org References: <20260225100421.2366864-1-flavra@baylibre.com> <20260225101748.2368295-1-flavra@baylibre.com> Content-Language: en-US From: David Lechner In-Reply-To: <20260225101748.2368295-1-flavra@baylibre.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/25/26 4:17 AM, Francesco Lavra wrote: > In the data storage description of a scan element, the first character > after the colon can have the values 's' and 'u' to specify signed and > unsigned integers, respectively. > Add 'f' as an allowed value to specify floating-point numbers formatted > according to the IEEE 754 standard. > > Signed-off-by: Francesco Lavra > --- > Documentation/ABI/testing/sysfs-bus-iio | 33 +++++++++++++----------- > Documentation/driver-api/iio/buffers.rst | 5 ++-- > Documentation/iio/iio_devbuf.rst | 3 ++- > 3 files changed, 23 insertions(+), 18 deletions(-) > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio > index 5f87dcee78f7..61961bca4dce 100644 > --- a/Documentation/ABI/testing/sysfs-bus-iio > +++ b/Documentation/ABI/testing/sysfs-bus-iio > @@ -1510,21 +1510,24 @@ Contact: linux-iio@vger.kernel.org > Description: > Description of the scan element data storage within the buffer > and hence the form in which it is read from user-space. > - Form is [be|le]:[s|u]bits/storagebits[>>shift]. > - be or le specifies big or little endian. s or u specifies if > - signed (2's complement) or unsigned. bits is the number of bits > - of data and storagebits is the space (after padding) that it > - occupies in the buffer. shift if specified, is the shift that > - needs to be applied prior to masking out unused bits. Some > - devices put their data in the middle of the transferred elements > - with additional information on both sides. Note that some > - devices will have additional information in the unused bits > - so to get a clean value, the bits value must be used to mask > - the buffer output value appropriately. The storagebits value > - also specifies the data alignment. So s48/64>>2 will be a > - signed 48 bit integer stored in a 64 bit location aligned to > - a 64 bit boundary. To obtain the clean value, shift right 2 > - and apply a mask to zero the top 16 bits of the result. > + Form is [be|le]:[s|u|f]bits/storagebits[>>shift]. Not related to this patch, but I notice that this is missing "repeat". \