From patchwork Fri Mar 9 18:43:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 10271657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 710ED603B5 for ; Fri, 9 Mar 2018 18:44:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 647C129E78 for ; Fri, 9 Mar 2018 18:44:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 577D129E60; Fri, 9 Mar 2018 18:44:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B737B29E60 for ; Fri, 9 Mar 2018 18:44:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751316AbeCISn2 (ORCPT ); Fri, 9 Mar 2018 13:43:28 -0500 Received: from mail-yw0-f194.google.com ([209.85.161.194]:42001 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbeCISn0 (ORCPT ); Fri, 9 Mar 2018 13:43:26 -0500 Received: by mail-yw0-f194.google.com with SMTP id u84so1498662ywg.9; Fri, 09 Mar 2018 10:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A5Y1GRTYzDDVz7FkHjPFIjpPeMHxUutHgyoaX9Sf6a4=; b=Yhv73NdYSvYAzxOSnyoNloFvwtV1/KQDXquDc+rBdGyNPZYsJQ0QhBc3KEKTaismiQ WlABzRXSUWmAOwodRL5Ss2LYs7vgXgxzsWrrAJ0Py8Hoo1/nfYqn7EtBYZtD/Quhqz7K P4GvPzUiwE+/PTuYuAzOsVcZjchNXBFRoift+zFPyc/dc1TzUI7hv6oLZoAOIQCqdVZD /VxR7jCFvXlSqE/NCNw8zUei3mAZ8WEPcGqJRXwbFmP0GLX76NcPsHPnr1KuPRYrVDd4 qYMdJDGw85UF6fAs+aCPcHmi9PW0J+aYTFiexW8fXdK7QNSQrAWkGsTFTFNHsYnAYy6F MrnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A5Y1GRTYzDDVz7FkHjPFIjpPeMHxUutHgyoaX9Sf6a4=; b=l6688KCXLQHYy1kKFqL6hIOjrXVIux2txxPxbkNQMuNIVQD+7lEQRnH014aT8MqnUR zzlvTwqdekFyX+W6ZfYgQT3HlJsDthZ8kSIiQa8wxnmyIs50me5W9AJWGi+Ar0FqFUMA lSR5l3cWgN2THo241z3/3/JsRep5dR+JHDQSgDABwvovHV7faaL5GNIsyLN7K/ycUsMM NRNCkDARG0VlQuSqDc+6VGMGTtuOOtlFBm/ymmEvNCN5sAtLidx3HddMLIG7a8LW+Q69 b0yO5FJm9eBQBui77IVSdZ7d3oCLib2mWJ9Kmlt+EyBJRMjrk7V9KiiuhF0xAIP706GF lO0w== X-Gm-Message-State: APf1xPCe1XIxc6f62TRh4Pgv/BqdSj7jyT2yM6NgQRWTd+TMgFJaoCLA NhcGVayZmAK6xgHKOPospAI= X-Google-Smtp-Source: AG47ELuVvhDoLtkUQ23tFlTcIPs7/YptNMU9Ioub+Xtqz8JXI0jvXhmb5ZHReygZu7N0NSIzaV2HHw== X-Received: by 10.129.179.197 with SMTP id r188mr19557426ywh.270.1520621006001; Fri, 09 Mar 2018 10:43:26 -0800 (PST) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id h8sm534725ywm.87.2018.03.09.10.43.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 10:43:25 -0800 (PST) From: William Breathitt Gray To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: benjamin.gaignard@st.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray Subject: [PATCH v5 5/8] counter: 104-quad-8: Documentation: Add Generic Counter sysfs documentation Date: Fri, 9 Mar 2018 13:43:19 -0500 Message-Id: X-Mailer: git-send-email 2.16.2 In-Reply-To: References: Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds standard documentation for the Generic Counter interface userspace sysfs attributes of the 104-QUAD-8 driver. Signed-off-by: William Breathitt Gray --- .../ABI/testing/sysfs-bus-counter-104-quad-8 | 115 +++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 116 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-counter-104-quad-8 diff --git a/Documentation/ABI/testing/sysfs-bus-counter-104-quad-8 b/Documentation/ABI/testing/sysfs-bus-counter-104-quad-8 new file mode 100644 index 000000000000..4269b438185a --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-counter-104-quad-8 @@ -0,0 +1,115 @@ +What: /sys/bus/counter/devices/counterX/countY_count_mode +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Count mode for channel Y. The preset value for channel Y is 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 preset value, while the lower limit is set to 0. The + counter freezes at count = preset when counting up, and + at count = 0 when counting down. At either of these + limits, the counting is resumed only when the count + direction is reversed. + + Non-recycle: + Counter is disabled whenever a 24-bit count 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 write to raw. + + Modulo-N: + A count boundary is set between 0 and the preset value. + The counter is reset to 0 at count = preset when + counting up, while the counter is set to the preset + value at count = 0 when counting down; the counter does + not freeze at the bundary points, but counts + continuously throughout. + +What: /sys/bus/counter/devices/counterX/countY_count_mode_available +What: /sys/bus/counter/devices/counterX/countY_noise_error_available +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Discrete set of available values for the respective Count Y + configuration are listed in this file. + +What: /sys/bus/counter/devices/counterX/countY_direction +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Read-only attribute that indicates the count direction of + Count Y. Two count directions are available: Forward and + Backward. + +What: /sys/bus/counter/devices/counterX/countY_enable +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Whether channel Y inputs A and B are enabled. Valid attribute + values are boolean. + +What: /sys/bus/counter/devices/counterX/countY_noise_error +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Read-only attribute that indicates whether excessive noise is + present at the channel Y count inputs in quadrature clock mode; + irrelevant in non-quadrature (Pulse-Direction) clock mode. + +What: /sys/bus/counter/devices/counterX/countY_preset +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + If the counter device supports preset registers, the preset + count for channel Y is provided by this attribute. + +What: /sys/bus/counter/devices/counterX/countY_preset_enable +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Whether to set channel Y counter with channel Y preset value + when channel Y index input is active, or continuously count. + Valid attribute values are boolean. + +What: /sys/bus/counter/devices/counterX/signalY_index_polarity +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Active level of channel Y-16 index input; irrelevant in + non-synchronous load mode. + +What: /sys/bus/counter/devices/counterX/signalY_index_polarity_available +What: /sys/bus/counter/devices/counterX/signalY_synchronous_mode_available +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Discrete set of available values for the respective Signal Y + configuration are listed in this file. + +What: /sys/bus/counter/devices/counterX/signalY_synchronous_mode +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Configure channel Y-16 counter for non-synchronous or + synchronous load mode. Synchronous load mode cannot be selected + in non-quadrature (Pulse-Direction) clock mode. + + Non-synchronous: + A logic low level is the active level at this index + input. The index function (as enabled via preset_enable) + is performed directly on the active level of the index + input. + + Synchronous: + Intended for interfacing with encoder Index output in + quadrature clock mode. The active level is configured + via index_polarity. The index function (as enabled via + preset_enable) is performed synchronously with the + quadrature clock on the active level of the index input. diff --git a/MAINTAINERS b/MAINTAINERS index febe27a9962e..8134050d175a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -270,6 +270,7 @@ ACCES 104-QUAD-8 DRIVER M: William Breathitt Gray L: linux-iio@vger.kernel.org S: Maintained +F: Documentation/ABI/testing/sysfs-bus-counter-104-quad-8 F: Documentation/ABI/testing/sysfs-bus-iio-counter-104-quad-8 F: drivers/counter/104-quad-8.c