Message ID | 41eafb0caa510cddf650cf5ff940639a184f3005.1677331779.git.mazziesaccount@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1500039wrd; Sat, 25 Feb 2023 06:07:44 -0800 (PST) X-Google-Smtp-Source: AK7set9QPNZqA/+HbR9CTQP87uxcQ41vu8J2ww/qDtaH9+gXXiMJY+SvVWpbwDNwjPSLkMQS1iEU X-Received: by 2002:a17:906:aad6:b0:8b1:3b95:cf3f with SMTP id kt22-20020a170906aad600b008b13b95cf3fmr25736002ejb.70.1677334063763; Sat, 25 Feb 2023 06:07:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677334063; cv=none; d=google.com; s=arc-20160816; b=Cp51G2Bvch1K1+hWLdvKVENl+TqOU237Fs5/ZhTdxWArgLMDBUqHdMX6p0coNcLdgw XeyKJfo5g6w5KXyFif67WpLC7feh4oM6umsDL9A/yoDDFU31P3tCI6XOCKT0RDATHAaJ HgtF+H1TmpsDWYX+I062aB+EN7HGhauPWktEe0ijWDQXy8l6GHcZAUXrB04ozoddmP+9 J2kVbz16WtCgT/ZVKLLypbyRT7vP1SPp6XtWiEouUYLKtvRqMJbx1oxp5DaO+4fmgrlj 7JhWnacpQ+iT22FUEstTcte/VBPeNn6+MdaD3+0jJUWjKe4iRIdYuSE16h/Vfs+0QfIa fNkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=q5fi3vMtgShoH3fTT5V+ZWG+/EL8tE3fQZCBLYT0iXQ=; b=VRwAN4O/5WoWO2rfOgv07tOc70wu2YTXFPblUOaZc1u5N9UPSBOoGyBplGOhKTR5Ih j7pNA2kJGBn5QJbJCK2pdxzk4SM50qgCeXOaIaxn7lbxTY5IDSRNM/SRE8Aq2+bmeGPP brDUGcqoqsf2iCjCl3dE1ilJPmrX1gEFs5aQ7PoCeaBEOglrvu+FBfJgQ0OuVRhshM8s WXjrWpG6k4wUKdv8B41au2mci248aviTINZ3JxNhVok1BDHJ/N0kxxUQUz3FNywpCyqQ n6AUofsejc0cPvG1mA6x+TOeqhyILrh57Qi4qA/ppoBKS0qyVoeHp3oS6qleJKup5Lry SrCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KK6mQrLF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a170906c30400b008de4a641fdasi2292218ejz.193.2023.02.25.06.07.05; Sat, 25 Feb 2023 06:07:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KK6mQrLF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbjBYN4b (ORCPT <rfc822;guoshuai5156@gmail.com> + 99 others); Sat, 25 Feb 2023 08:56:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjBYN4a (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 25 Feb 2023 08:56:30 -0500 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFDAE13DFB; Sat, 25 Feb 2023 05:56:28 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id t14so1890935ljd.5; Sat, 25 Feb 2023 05:56:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=q5fi3vMtgShoH3fTT5V+ZWG+/EL8tE3fQZCBLYT0iXQ=; b=KK6mQrLFErLtfpWOVIfKT+MonHolhZkfKMJpKMAitJXdyqK2RkaV5BokmMP45g3am9 I5aIFjuXC44Pecf1/q+WzbhhLYCZWuIXHqc3RANHAi3xor/7xzE546pgp2IulKrG+SLW 3zyhZLML13+TGSITRSB5qs4bLJJyqP7NvlxGd3DCJjxGTSH32DYhaKt07EHwlJ5cX10R c9G1250G/ac9i/G4ayB3Un8cYEPi8pDZeiZsQtoX7zDceQ38r7IB59fDWM66xxTnihl5 teSLhtyTzls8o8vhQNoLzdoVmJgtQ5+J5PkduhsZRxV6WLzoUR7zP1cw4SP94nUmoIy8 0ixA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=q5fi3vMtgShoH3fTT5V+ZWG+/EL8tE3fQZCBLYT0iXQ=; b=oPqsre4SF2nGnlxxsWOexEVPYOz9/NNNlD2rOCRujom/hj5zoR62KZ5PHFjbd/z0yw WK6QHPF5Bd0RTemog7Ik8BNtzbewjwtlppquutgT9I6T3UBTXtnq4wejeuKfcNyMVb+D 26UWChq3nyn9q5f17DVy0i3YTzCb7cBUTKwJZPNXKf6MKlfNRKn1VqBh6PMjmXMEBfJJ QulxYwi2xp/PbfoA9Jglb1Or7tU0vhiZqjThOTsp7/gBIhY9oiPLuzRAR6MQrkXGveqR JJOpBo3dqzwfBFyE8jft9ol9lA/R8czHmcUYnXBzl9Ni0H+KrTalBSr9OJ7KC+SibDPM iqpw== X-Gm-Message-State: AO0yUKUQZQnBCt23TMG0G6hVVLWbPEJiNLPoYciFZbqbxVb37bXvMqNQ 954wnVIfVCSA2UuJ9POyrsiAw4yPgus= X-Received: by 2002:a2e:888c:0:b0:295:8f08:118b with SMTP id k12-20020a2e888c000000b002958f08118bmr5576580lji.18.1677333387126; Sat, 25 Feb 2023 05:56:27 -0800 (PST) Received: from dc75zzyyyyyyyyyyyyyyt-3.rev.dnainternet.fi (dc75zzyyyyyyyyyyyyyyt-3.rev.dnainternet.fi. [2001:14ba:16f3:4a00::1]) by smtp.gmail.com with ESMTPSA id s6-20020a05651c200600b002934b8d115csm173208ljo.51.2023.02.25.05.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 05:56:26 -0800 (PST) Date: Sat, 25 Feb 2023 15:56:16 +0200 From: Matti Vaittinen <mazziesaccount@gmail.com> To: Matti Vaittinen <mazziesaccount@gmail.com>, Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Cc: Jonathan Cameron <jic23@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, Andrea Merello <andrea.merello@iit.it>, Andy Shevchenko <andy.shevchenko@gmail.com>, Matti Vaittinen <mazziesaccount@gmail.com>, Jagath Jog J <jagathjog1996@gmail.com>, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] doc: Make sysfs-bus-iio doc more exact Message-ID: <41eafb0caa510cddf650cf5ff940639a184f3005.1677331779.git.mazziesaccount@gmail.com> References: <cover.1677331779.git.mazziesaccount@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hVlVlqIXRHAuNoVW" Content-Disposition: inline In-Reply-To: <cover.1677331779.git.mazziesaccount@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758812243457918301?= X-GMAIL-MSGID: =?utf-8?q?1758812243457918301?= |
Series |
iio: Improce kernel docs
|
|
Commit Message
Matti Vaittinen
Feb. 25, 2023, 1:56 p.m. UTC
A few IIC channel descriptions explained used units as:
data is in foo "that can be processed into an" [unit] value. The "can be
processed into" is quite broad statement as it does not really explain
what this processing means. This makes units pretty much useless.
After discussion with Jonathan, it seems the units for these channels
should also be well-defined as for all other channels. The processing
means the standard scale and offset application that is used throughout
the IIO. Let's make it more obvious by stating that the units are [unit]
after scale ane offset are applied.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
---
Documentation/ABI/testing/sysfs-bus-iio | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
Comments
On Sat, 25 Feb 2023 15:56:16 +0200 Matti Vaittinen <mazziesaccount@gmail.com> wrote: > A few IIC channel descriptions explained used units as: IIO? > data is in foo "that can be processed into an" [unit] value. The "can be > processed into" is quite broad statement as it does not really explain > what this processing means. This makes units pretty much useless. > > After discussion with Jonathan, it seems the units for these channels > should also be well-defined as for all other channels. The processing > means the standard scale and offset application that is used throughout > the IIO. Let's make it more obvious by stating that the units are [unit] > after scale ane offset are applied. > > Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Excellent. Thanks for doing this. I'll pick this patch up now. Applied to the togreg branch of iio.git and pushed out as testing (in this case to be mostly ignored by 0-day ;) Jonathan > --- > Documentation/ABI/testing/sysfs-bus-iio | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio > index 6ba34c0d9789..b435c6f065ae 100644 > --- a/Documentation/ABI/testing/sysfs-bus-iio > +++ b/Documentation/ABI/testing/sysfs-bus-iio > @@ -1807,8 +1807,8 @@ What: /sys/bus/iio/devices/iio:deviceX/out_resistanceX_raw > KernelVersion: 4.3 > Contact: linux-iio@vger.kernel.org > Description: > - Raw (unscaled no offset etc.) resistance reading that can be processed > - into an ohm value. > + Raw (unscaled no offset etc.) resistance reading. > + Units after application of scale and offset are ohms. > > What: /sys/bus/iio/devices/iio:deviceX/heater_enable > KernelVersion: 4.1.0 > @@ -1894,8 +1894,9 @@ What: /sys/bus/iio/devices/iio:deviceX/in_electricalconductivity_raw > KernelVersion: 4.8 > Contact: linux-iio@vger.kernel.org > Description: > - Raw (unscaled no offset etc.) electric conductivity reading that > - can be processed to siemens per meter. > + Raw (unscaled no offset etc.) electric conductivity reading. > + Units after application of scale and offset are siemens per > + meter. > > What: /sys/bus/iio/devices/iio:deviceX/in_countY_raw > KernelVersion: 4.10 > @@ -1952,7 +1953,7 @@ KernelVersion: 4.18 > Contact: linux-iio@vger.kernel.org > Description: > Raw (unscaled) phase difference reading from channel Y > - that can be processed to radians. > + Units after application of scale and offset are radians. > > What: /sys/bus/iio/devices/iio:deviceX/in_massconcentration_pm1_input > What: /sys/bus/iio/devices/iio:deviceX/in_massconcentrationY_pm1_input
On Sat, Apr 8, 2023 at 1:18 PM Jonathan Cameron <jic23@kernel.org> wrote: On Sat, 25 Feb 2023 15:56:16 +0200 > Matti Vaittinen <mazziesaccount@gmail.com> wrote: ... > Applied to the togreg branch of iio.git and pushed out as testing > (in this case to be mostly ignored by 0-day ;) One fix is needed? ... > > Description: > > Raw (unscaled) phase difference reading from channel Y > > - that can be processed to radians. > > + Units after application of scale and offset are radians. The previous chunks and confusion in reading the above suggest that period after Y must be added. > > What: /sys/bus/iio/devices/iio:deviceX/in_massconcentration_pm1_input > > What: /sys/bus/iio/devices/iio:deviceX/in_massconcentrationY_pm1_input
On Sun, 9 Apr 2023 12:47:58 +0300 Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > On Sat, Apr 8, 2023 at 1:18 PM Jonathan Cameron <jic23@kernel.org> wrote: > On Sat, 25 Feb 2023 15:56:16 +0200 > > Matti Vaittinen <mazziesaccount@gmail.com> wrote: > > ... > > > Applied to the togreg branch of iio.git and pushed out as testing > > (in this case to be mostly ignored by 0-day ;) > > One fix is needed? > > ... > > > > Description: > > > Raw (unscaled) phase difference reading from channel Y > > > - that can be processed to radians. > > > + Units after application of scale and offset are radians. > > The previous chunks and confusion in reading the above suggest that > period after Y must be added. Fixed. Thanks > > > > What: /sys/bus/iio/devices/iio:deviceX/in_massconcentration_pm1_input > > > What: /sys/bus/iio/devices/iio:deviceX/in_massconcentrationY_pm1_input >
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 6ba34c0d9789..b435c6f065ae 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1807,8 +1807,8 @@ What: /sys/bus/iio/devices/iio:deviceX/out_resistanceX_raw KernelVersion: 4.3 Contact: linux-iio@vger.kernel.org Description: - Raw (unscaled no offset etc.) resistance reading that can be processed - into an ohm value. + Raw (unscaled no offset etc.) resistance reading. + Units after application of scale and offset are ohms. What: /sys/bus/iio/devices/iio:deviceX/heater_enable KernelVersion: 4.1.0 @@ -1894,8 +1894,9 @@ What: /sys/bus/iio/devices/iio:deviceX/in_electricalconductivity_raw KernelVersion: 4.8 Contact: linux-iio@vger.kernel.org Description: - Raw (unscaled no offset etc.) electric conductivity reading that - can be processed to siemens per meter. + Raw (unscaled no offset etc.) electric conductivity reading. + Units after application of scale and offset are siemens per + meter. What: /sys/bus/iio/devices/iio:deviceX/in_countY_raw KernelVersion: 4.10 @@ -1952,7 +1953,7 @@ KernelVersion: 4.18 Contact: linux-iio@vger.kernel.org Description: Raw (unscaled) phase difference reading from channel Y - that can be processed to radians. + Units after application of scale and offset are radians. What: /sys/bus/iio/devices/iio:deviceX/in_massconcentration_pm1_input What: /sys/bus/iio/devices/iio:deviceX/in_massconcentrationY_pm1_input