From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.182]) (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 5899234A77C for ; Wed, 21 Jan 2026 02:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768963644; cv=none; b=R7AToZ6dQaha7dv2Ye25s+gsHMU59K56mgSMLTysJ+RE0dQTp1kDqx+FuvN9BpKsAkHWnreuB0S38v+GrngFtwxC7aJSNhq4p5xI60O5aprr5Q89yS/tsjDP8pvQwhpD7xgvqrYwqtkzFzy1DCNFVkbxIoG4YWXznzjojaEpAso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768963644; c=relaxed/simple; bh=ToxIZWctlQilSCoHqiefXHI/xunJ4P0DC5xriL95dRs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Dur3zhj3MLwOL93m9naKxP5F+tqTX5FcbsUrgD0f9nyGeGBETvdRM0Lw8ajCSm7+XwkUnD4OdiLrWUjBWMAckj46neXClKcvCGEhlHFV1B2ncP0fLMTCdy06cgqe8D3JO/SUPKwASmFDHOsLeijvMLH7cVKCgPbjPG9sQq3iWLI= 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=lOkuSnO3; arc=none smtp.client-ip=74.125.82.182 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="lOkuSnO3" Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-2b453b17e41so280889eec.1 for ; Tue, 20 Jan 2026 18:47:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768963642; x=1769568442; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VQbdBgfkd7EcwE75AgiRI1/65NEwUWBGyhPvKNZxv3w=; b=lOkuSnO34aYx7/g7u1s6a4bOIf6xDW5g0ymownW6ldnrfVC3SH67XtlUDnOIXAZcyV Vl8x6NgmayGC6YQvP0Yd4mOYFT7/GBvNZfAQLI8mNu9PR8iQGAclG4/YjjohtTGp7uuV 6Kw1E8Ael+3/jC+y/4O4QuDB4PiLEcjZyjlxi2T92O8bcKbms23VA6R0TArSCIH4ss/h aZZRztJNbO5H3lHIZVs3MRp9Tpkrm9Guxrt4Qsjj1lwpQI2glBZMsoD+1bG4D88SH236 8cqif8QVuJlT/ODpoJVTP5oii8wDfgkCqpO6Ho4TfqlHzELFufIMpjkaUm38bRc6fb4U qTxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768963642; x=1769568442; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VQbdBgfkd7EcwE75AgiRI1/65NEwUWBGyhPvKNZxv3w=; b=mwRKXWMiNalQ/D6CuHQThICDcE3ekcWbx3V74wfc+Sihf5pcapE6+Mzlq1VMpR/Hx+ eJpXXw+1GHxnz+rqa8+KhxblWLC2jU+D1yLGqt2MF5UEnbMjJQ6Xiaera4j1scgDiaep 8Aar+qxrSE4S1xNNWXjH8gC3b0gKxbMW/nlEX6p/DZlVzIlPOPQGUBXVvVwcd+DdYcZl 39NDeF2NMAQS70UCHYY3EK5wuatCKxWXVdKeV5sDdzjByJwS/bjpQ5c+NihitUJLjqyl wBiwRI8Em6Z9FV4UDDcMIytxwCmHl8XBaEJhbFosrnBmFzpyAsFJ14kWJcGstgQMK+hs 13HA== X-Forwarded-Encrypted: i=1; AJvYcCVSL7lZnWJH0dWy2pbTTAT808OrXT0uVf2fq1sA+bhYYbqo96CvApXf2ljkr1VDK241NZwGnpoZAtalfbk=@vger.kernel.org X-Gm-Message-State: AOJu0YwIMK7g4D4ZjRLu/betaMM4QCSzcQnA8HvRd3Pq4P/7RYSJZ+wr RSSTIKXyze9BpvE7BRXydrzCIRerU9Ddb87X0owGuT/UlFe66V1ECzwb X-Gm-Gg: AZuq6aK8AVXbtLpfP6oXdgHsieLZq05dTeQ/efVhggpnhy0Qsa8okaFV80c6SejfOgw z6XKwM4cIZcLfUll2bc9cbmunQCWKas0bJSPF1eZ48j0geVB9X0ledTou3w/7KbDsG5EyBZW7fZ tI2eHYGgKwSraFv5RSKnxYumm/xC+yowtG8qgFuvd7a+9g1knpx3piO9s68xOotoUf2Nsv/cU7U gSR9uAeZV87X6S4EHxjZbkq247KfOCdA7PiDAHg/MytYZbaon+6vYY1HC8lByp7ZMbt7fZLrPr6 U81sgPWBWFUS9ToC0wTVdaKyPxezwJqEcbQb/FNkV93JGmYEjTIpDtmSVx08hQNzGFOPuQymJJk ama0qBYhDnL/48CxkZbVDlyr/yt1yrFtNqtrWQbFGS2HDj+g+Jlzw5/Bco5+P3ywohsgQSukUkr nrLXtVKvB8iiLA6EWGjEekjU1lC9Sa3g== X-Received: by 2002:a05:7300:3208:b0:2a6:a306:efdb with SMTP id 5a478bee46e88-2b6b3468f3amr12058623eec.3.1768963642311; Tue, 20 Jan 2026 18:47:22 -0800 (PST) Received: from localhost ([2804:30c:2766:a500:b70:8c42:f792:bef6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b712881482sm1136344eec.5.2026.01.20.18.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 18:47:21 -0800 (PST) Date: Tue, 20 Jan 2026 23:49:11 -0300 From: Marcelo Schmitt To: David Lechner Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, jic23@kernel.org, Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org Subject: Re: [RFC PATCH v1 2/9] iio: ABI: Accurately describe in_distance_input Message-ID: References: <2d148091-9e40-41ee-95cb-544abcbf81be@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d148091-9e40-41ee-95cb-544abcbf81be@baylibre.com> On 01/18, David Lechner wrote: > On 1/18/26 12:20 PM, Marcelo Schmitt wrote: > > There is only one driver (drivers/iio/accel/mma9553.c) that declares a > > channel of type IIO_DISTANCE with an info_mask containing > > IIO_CHAN_INFO_PROCESSED. Though, mma9553.c provides distance in meters (as > > would be expected for the _input interface). Split in_distance_raw and > > in_distance_input ABI documentation to provide accurate description for the > > in_distance_input interface. > > > > Fixes: 7cf78db585b1 ("iio: Add ABI documentation for illuminance raw and scale values in light") > > Signed-off-by: Marcelo Schmitt > > --- > > Added a fix tag though not sure it's needed/desired since it might not be worth > > to backport documentation? > > > > Documentation/ABI/testing/sysfs-bus-iio | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio > > index aec39b8e3345..27251b65ea0e 100644 > > --- a/Documentation/ABI/testing/sysfs-bus-iio > > +++ b/Documentation/ABI/testing/sysfs-bus-iio > > @@ -1613,6 +1613,13 @@ Description: > > user). Units after application of scale are Joules. > > > > What: /sys/.../iio:deviceX/in_distance_input > > +KernelVersion: 4.0 > > +Contact: linux-iio@vger.kernel.org > > +Description: > > + This attribute is used to read the measured distance (in meters) > > + to an object or the distance covered by the user since the last > > + reboot while activated. > > + > > What: /sys/.../iio:deviceX/in_distance_raw > > KernelVersion: 4.0 > > Contact: linux-iio@vger.kernel.org > > I'm not sure it is worth splitting these up since the documentation is > just repeated except for the bit about scale. And it is common knowledge > that scale only applies to raw and not input. It's common knowledge to us who are familiar with IIO. For anyone else, it might not be. Plus, it is tecnically incorrect to have _raw and _input together like they were before. > > Also, looks like raw and input are swapped. raw it the one with scale > so the sentence about scale should be with the raw attribute. Hmm, have I messed up with the patches? Their final look in my local tree is: What: /sys/.../iio:deviceX/in_distance_input KernelVersion: 4.0 Contact: linux-iio@vger.kernel.org Description: This attribute is used to read the measured distance (in meters) to an object or the distance covered by the user since the last reboot while activated. What: /sys/.../iio:deviceX/in_distance_raw KernelVersion: 4.0 Contact: linux-iio@vger.kernel.org Description: This attribute is used to read the measured distance to an object or the distance covered by the user since the last reboot while activated. Units after application of scale are meters.