Received: by 10.223.185.111 with SMTP id b44csp636026wrg; Fri, 9 Mar 2018 10:45:03 -0800 (PST) X-Google-Smtp-Source: AG47ELswsTy/11rcsLYe296q4LLmfQ2uwbp1dH5BneC5YIDTYldiTvID2fvNTPeHX4fBmPdofdpX X-Received: by 10.99.64.197 with SMTP id n188mr25066797pga.21.1520621103083; Fri, 09 Mar 2018 10:45:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520621103; cv=none; d=google.com; s=arc-20160816; b=kwQgJXouyw6s6vWV1Y+U4VrEGpzcmkBkbfHln8ujRYWZa2eDIRutdJl5itPUIHXfVN SQ7w6qicjxCnPBibWWqOewIYgM0CdI5qkgZXA/ixxA+mKpm5ToIfQY6lxdYjk930+D3a HEKAkLUm7SWkSlfG2J9WBlrpNi0UzCjzOvSUHJ7BVLPPl6nx/kLhJsWBWClCr+4ovuGe WnCX89siOOYxKF4sa2wwih9r78ilNdDiWO762uGFi6D/16mwEO9NcDahnjSh6n8yQI1H N3AkkXAHLgE54G9gePjW0JgYt8AUhFgGbrggeOjEbCXNCeTwwwMul3kkA2Yztu5yDbHE 6Xhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=A5Y1GRTYzDDVz7FkHjPFIjpPeMHxUutHgyoaX9Sf6a4=; b=NtSOeiu8hM/YlSYiqS6mhpexVrzIkLTqEUo5IVqbk4/3r3Aols5dz7UwxUxMB/R4rM uhcndDGe/ztHG4/0KdXCvKYC7lISlrhboi1WghtF6gJhaL3Upa9Xk0ZEtdnqJ2dxLNhf cUTPPNVdykLIfdSu2oBEGEuLdyojzSGMUrjjNWdlF3XDoXYS/dxeWm59p5ELmzNhubh2 uy4DY+bWJahTldvPv7chvbggXagEAsI6irZ8gAqhOqQLhj4gzp/uJXNSQV2q//Mv+eWP PZgNy+e1zNboHP+Lo1PZE21/aVqdZUA1BYpZ+NeLjzefuU0F8JfQJmjsbVshVV1cDpXP tfyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yhv73NdY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38-v6si1225647pln.397.2018.03.09.10.44.48; Fri, 09 Mar 2018 10:45:03 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yhv73NdY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932622AbeCISn3 (ORCPT + 99 others); Fri, 9 Mar 2018 13:43:29 -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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.16.2