Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3289792yba; Mon, 8 Apr 2019 15:32:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTLKzcBQp+Pe5pAJa7+QabHEvW70TmKS4OyV9Y/Rgy3fVDPEy9NSKyGUZ5MHxOgyhMSSyZ X-Received: by 2002:a17:902:e287:: with SMTP id cf7mr4732990plb.217.1554762767962; Mon, 08 Apr 2019 15:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554762767; cv=none; d=google.com; s=arc-20160816; b=HrNpAsTQY7/7OJalh1lAFoDXAV5qURSBUVuvOlg9zpRN/9OEXXZZDZQFVlMSF9pYtF e7hq1gGJbcbH7igAjiCJZqyo4TVPd1WYap3hkTbFT0MrPSON+r+0b1LJcHBwQ+oZoObP S9OWIB0VuXPEfKOm9ffvpWL4VGecA73kqiW264OlRkD7wwYnulWrjMh1A0mLvBafr/e1 uGMOpHmWta7NgjY+pY50uiKR+284+vXyNfgNDUErMTMaH5qxPyOcoNklWtSnTPKNqI+J 0/5YmtBB7mFoM2GWG5jBi/qRA/kslhgrW65IcOII4lG/+iCG5/AD2/LAeLJv2hMTEQM7 b+PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iIKjKr1Uanpso+/KVuFP3YVI9EQNByYfOsWfUFAIL5U=; b=RL0kQZIuvZP/3ohJhAJoOHI6KdKhw6xaR20IACkmiLfKPqwSbl1WFWS6C6XkqmJ0Pc q9rcQdI5SCzbEAlEVayvt+k4skhq4V1KPBRksAQ1n4l3N/HGPHZJ0YzecVUvr3s9RDyL kya3ePNwAHyMaZ1f5iiGU3QvhP46uDTDxQEyLbtSEmd4w8rI7pX7tA6a59EJaW/2WqKM +6f+pVUI2WGaWcE0HHHJP0bvw3F3jiPe92QdTNxjxCpjS8zRi3O7TpWkCM4cISNEW22H xZGJRwWkig+75UaCL+9kSQV9P9H03CdQekoyPO6wvDMaUQUoG6EvPubEzAMsdtb/wvqN UL1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si28631978pgj.576.2019.04.08.15.32.32; Mon, 08 Apr 2019 15:32:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726630AbfDHVzg (ORCPT + 99 others); Mon, 8 Apr 2019 17:55:36 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:57168 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726050AbfDHVzg (ORCPT ); Mon, 8 Apr 2019 17:55:36 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 41158806A6; Mon, 8 Apr 2019 23:55:24 +0200 (CEST) Date: Mon, 8 Apr 2019 23:55:31 +0200 From: Pavel Machek To: William Breathitt Gray Cc: gregkh@linuxfoundation.org, jic23@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, fabrice.gasnier@st.com, benjamin.gaignard@st.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, akpm@linux-foundation.org, david@lechnology.com, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, leoyang.li@nxp.com, daniel.lezcano@linaro.org, tglx@linutronix.de, thierry.reding@gmail.com, esben@haabendal.dk, linux-pwm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, patrick.havelange@essensium.com, Jonathan Cameron Subject: Re: [PATCH v10 02/18] counter: Documentation: Add Generic Counter sysfs documentation Message-ID: <20190408215531.GB27592@amd> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JP+T4n/bALQSJXh8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JP+T4n/bALQSJXh8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue 2019-04-02 15:30:37, William Breathitt Gray wrote: > This patch adds standard documentation for the userspace sysfs > attributes of the Generic Counter interface. >=20 > Reviewed-by: Jonathan Cameron > Signed-off-by: William Breathitt Gray > --- > Documentation/ABI/testing/sysfs-bus-counter | 230 ++++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 231 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-counter >=20 > diff --git a/Documentation/ABI/testing/sysfs-bus-counter b/Documentation/= ABI/testing/sysfs-bus-counter > new file mode 100644 > index 000000000000..566bd99fe0a5 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-bus-counter > @@ -0,0 +1,230 @@ > +What: /sys/bus/counter/devices/counterX/countY/count > +KernelVersion: 5.2 > +Contact: linux-iio@vger.kernel.org > +Description: > + Count data of Count Y represented as a string. > + > +What: /sys/bus/counter/devices/counterX/countY/ceiling > +KernelVersion: 5.2 > +Contact: linux-iio@vger.kernel.org > +Description: > + Count value ceiling for Count Y. This is the upper limit for the > + respective counter. > + > +What: /sys/bus/counter/devices/counterX/countY/floor > +KernelVersion: 5.2 > +Contact: linux-iio@vger.kernel.org > +Description: > + Count value floor for Count Y. This is the lower limit for the > + respective counter. > + > +What: /sys/bus/counter/devices/counterX/countY/count_mode > +KernelVersion: 5.2 > +Contact: linux-iio@vger.kernel.org > +Description: > + Count mode for channel Y. The ceiling and floor values for > + Count Y are used by the count mode where required. The following > + count modes are available: > + > + normal: > + Counting is continuous in either direction. > + > + range limit: > + An upper or lower limit is set, mimicking limit switches > + in the mechanical counterpart. The upper limit is set to > + the Count Y ceiling value, while the lower limit is set > + to the Count Y floor value. The counter freezes at > + count =3D ceiling when counting up, and at count =3D floor > + when counting down. At either of these limits, the > + counting is resumed only when the count direction is > + reversed. > + > + non-recycle: > + The counter is disabled whenever a counter overflow or > + underflow takes place. The counter is re-enabled when a > + new count value is loaded to the counter via a preset > + operation or direct write. > + > + modulo-n: > + A count value boundary is set between the Count Y floor > + value and the Count Y ceiling value. The counter is > + reset to the Count Y floor value at count =3D ceiling when > + counting up, while the counter is set to the Count Y > + ceiling value at count =3D floor when counting down; the > + counter does not freeze at the boundary points, but > + counts continuously throughout. > + > +What: /sys/bus/counter/devices/counterX/countY/count_mode_available > +What: /sys/bus/counter/devices/counterX/countY/error_noise_available > +What: /sys/bus/counter/devices/counterX/countY/function_available > +What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available > +KernelVersion: 5.2 > +Contact: linux-iio@vger.kernel.org > +Description: > + Discrete set of available values for the respective Count Y > + configuration are listed in this file. Values are delimited by > + newline characters. Elsewhere in sysfs we do space-separated: pavel@amd:~$ cat /sys/power/state freeze mem disk And we use [] to mark current selection: pavel@amd:~$ cat /sys/class/leds/tpacpi\:\:thinkvantage/trigger [none] bluetooth-power rfkill-any rfkill-none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock AC-online BAT0-charging-or-full BAT0-charging BAT0-full BAT0-charging-blink-full-solid rfkill0 phy0rx phy0tx phy0assoc phy0radio phy0tpt mmc0 timer heartbeat audio-mute audio-micmute rfkill1 Note this only works if you have less than PAGE_SIZE of entries... and will never have more. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --JP+T4n/bALQSJXh8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlyrw1MACgkQMOfwapXb+vIrJACdGzny2kYErlj2vHsj5g0+nisf vFUAn2r0eo4ejc8ifXJmGFrOjikVszOA =36BY -----END PGP SIGNATURE----- --JP+T4n/bALQSJXh8--