From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E86E7C10F0E for ; Tue, 9 Apr 2019 05:06:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B407F2084F for ; Tue, 9 Apr 2019 05:06:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GatT80oW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jzdOPlu/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B407F2084F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xtUoKM4Yl2NghpFgNEzwr/0RKoYzfCCemlG9BYC+I7M=; b=GatT80oW5+OddX e9iqaQejtHbtwN7fFnEWrzUKowieVulAcy7Ia7mEer4KSzYMlukaZKKMZCMip2p/k2EjMAebgkFl3 y3VezSX7gSn+M9sdJngNI2cemPST8ZmEmUIRD3Jo3aWYABNGbqINc72J3EH4GAluP+lFvdadW8710 NlerXV4eGecydy4G1J91WwRICU+B1MmLp99uabibYEpzwyPVepE5IiqEMIuH+qv6KPqXDzaIKenFS TxBGNPmxPp2X0nAcqjBfbApKJJ0rjEbBWeDDCzVMNXEE/zUkGgyLrTbBAugczzk7gyUi9Xi10hTDC BE0l8qZBQ31r2g3rNb7g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDixX-0007Sw-La; Tue, 09 Apr 2019 05:06:11 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDixT-0007Sa-Mf for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2019 05:06:09 +0000 Received: by mail-pg1-x543.google.com with SMTP id v12so8597625pgq.1 for ; Mon, 08 Apr 2019 22:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mPzuYWAD9n3E7cK9DQsoS+9to3SIkl5lmMig0KfgMSY=; b=jzdOPlu/x8auCMomI1PhvJbl6f2twqu5f+3vfkvAV+xE4cSTD4MEdJHxBxcS6yZqq7 Wi39SerktOeg2gpodvg1AttXtj/Agsk4ZqT+ll/DmXRCFXA3Rjxv4W5JXcJX12w2wN76 dRlAvbUeYZEdvLSCT/Uss7a0WGfW2BKtrXLgXRvC3oSExXDC5J5XOfEY7Bmkeaqldqo5 ofQJMLjd1hvJFdB8CUbFyyIJY+r2saK636byggJ7IyW27rDUZrXVU6SyMCAhmEBOTAxA KKZ9ZFWfs5Cuc9geuO38yzWGzY7Wi5VVNgI6n1sfPWfNRYKsiEibfk9xWlxOtSOlTpg3 qikQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mPzuYWAD9n3E7cK9DQsoS+9to3SIkl5lmMig0KfgMSY=; b=QCKJSh5GqdmgzXNQ5hUHjmTRojqUtV8RmdgTj470I7UBZBVGZvQcXUcRc3k1xRpa19 t9FMz0EGoW5Mo5EOvDN8dfFebcD7ozppkRLPIwriobEbfyQq6DAkYAUS1nG0E6zDCIPG aDm/rd0H11vo87Du5H4WVDRZK4xAu1OCHNjg1q/JWUTdni109vG1/okW9vgkHJSKjN1H +5uI6lvM3xUL9dSGAbdVQJh+cX+PvaWYKR3qT3S7ilISeqHmXGTQktmya882Lfuu5m9S F7wQZnBKJ4Ghr4c40EG3bJjWIYjH8oH5KGvkynp1+fLLgL7znS/7p2wx703uzgBEhoSS agrg== X-Gm-Message-State: APjAAAV/bhycR+/ZN1ODVwu17znaDRmxr5Ve6H3HOCZ9RZ2URSWLLTbZ MZ5FmK1QXZUB+lgAt8M7las= X-Google-Smtp-Source: APXvYqxpbmL0psDw+R51UHqyQpUsOO53H3NyesVqG9HDMScxBNzwN2DcZVBVbnl14am4Y2jDppOgXw== X-Received: by 2002:a65:6212:: with SMTP id d18mr30672141pgv.162.1554786366700; Mon, 08 Apr 2019 22:06:06 -0700 (PDT) Received: from icarus ([2001:268:c1c0:11e:c70:4af9:86e2:2]) by smtp.gmail.com with ESMTPSA id j19sm15751431pfr.155.2019.04.08.22.05.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Apr 2019 22:06:05 -0700 (PDT) Date: Tue, 9 Apr 2019 14:07:08 +0900 From: William Breathitt Gray To: Pavel Machek Subject: Re: [PATCH v10 02/18] counter: Documentation: Add Generic Counter sysfs documentation Message-ID: <20190409050708.GB2842@icarus> References: <20190408215531.GB27592@amd> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190408215531.GB27592@amd> User-Agent: Mutt/1.11.4 (2019-03-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190408_220607_768342_0AC1CE25 X-CRM114-Status: GOOD ( 26.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, benjamin.gaignard@st.com, linux-pwm@vger.kernel.org, linux-iio@vger.kernel.org, patrick.havelange@essensium.com, thierry.reding@gmail.com, pmeerw@pmeerw.net, lars@metafoo.de, daniel.lezcano@linaro.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, david@lechnology.com, linuxppc-dev@lists.ozlabs.org, robh+dt@kernel.org, Jonathan Cameron , tglx@linutronix.de, fabrice.gasnier@st.com, esben@haabendal.dk, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, leoyang.li@nxp.com, knaack.h@gmx.de, akpm@linux-foundation.org, shawnguo@kernel.org, jic23@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Apr 08, 2019 at 11:55:31PM +0200, Pavel Machek wrote: > 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. > > > > 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 > > > > 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 = ceiling when counting up, and at count = 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 = ceiling when > > + counting up, while the counter is set to the Count Y > > + ceiling value at count = 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 > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html Marking the current selection with [] or similar does seem useful. But delimiting by space does seem to cause confusion in cases where the values also include spaces (e.g. "quadrature x1 a"). I see that in these cases a "-" is used in place of a space, but that wouldn't work very well when values can also contain hyphens (e.g. "pulse-direction"). William Breathitt Gray _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel