From patchwork Fri Mar 9 18:42:35 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: 10271697 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 BB701602BD for ; Fri, 9 Mar 2018 18:47:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0577299FF for ; Fri, 9 Mar 2018 18:47:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A513429A46; Fri, 9 Mar 2018 18:47:43 +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 3F05F299FF for ; Fri, 9 Mar 2018 18:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751695AbeCISmq (ORCPT ); Fri, 9 Mar 2018 13:42:46 -0500 Received: from mail-yw0-f195.google.com ([209.85.161.195]:40784 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543AbeCISmn (ORCPT ); Fri, 9 Mar 2018 13:42:43 -0500 Received: by mail-yw0-f195.google.com with SMTP id y186so1501805ywf.7; Fri, 09 Mar 2018 10:42:42 -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=FdN1rGtLJ5mGLzaTj1wsQ6OSTFu1oQ/UlwcTi+6Xo5g=; b=EEUaLMqbguRyAn/wRJPaNC4namzw5r3/fIZvLzpcSvNKxK1YC6lmj+FNIk0L6H36qa hzpOltafsQZEVeDSTyJVlYMx935XSSMxo7728cxUaEbfJlpOJKwpecTWW1yei6c6N9eE 2uy5wXe1N+u93WgkBt7FY/HZS7ircnirhaT2Rd6ZEeA+6z6qZpESeoQmSRF6tB3vAsch bj/+CN50JtgNqYK4NvRkp4+aBj+duq5xeUJJ5Wu+IkxuLfBr9HvOgCBOLN3J42MELANF tk/XNmmTmo1WZM6EbtSYH94wdn2xJlwod+w9+CXih/LxWMFsV+osNNcuWD6Qmgn/Ke+t FiBA== 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=FdN1rGtLJ5mGLzaTj1wsQ6OSTFu1oQ/UlwcTi+6Xo5g=; b=QlRyn/L7MRiD66RcNGyAt5oroBv3XFyNqVsQSOdBEkjkWYiu0AzXJ+mYuVUV8IsGey EF6kpVW36M+TZPpvQXeZSL4uTwml48srWtKPPl/O8J2BMmaBhrUJGz5d5z5mwyaZX7xO tyMi8vDUC6js66jsE+MQcwFJFWc9hnUPtH9OxIX2RcZ3qEGqHpnQyunO5w0xTBI/KgyE e7DRJNVgXro6Wc2eNbhPYgKW2E3F81F1QhJq9YSBCHUFNRagBtR+F4U0r2Z4zifa4XjX 6+ndcH+uXdIZ6q0GHzOv2L6CdDUtPUgcB6eCpD5eflmAFD1jnxcmGiM6PjpNBkY1TWV/ Hrrw== X-Gm-Message-State: AElRT7EupbSN6YyUf17YADh+nI5QULtINYvM16PEKz4l/KYMghHTKXjH 5NRVpZJ9doll0D2YJ+qd+4E= X-Google-Smtp-Source: AG47ELvQf/5twqoDvzRuT5at6ObMPlie3+EErmmwSPR416f74jT0H0LtqzdzQDVpRu0g65KUzvTmeg== X-Received: by 2002:a25:b7d1:: with SMTP id u17-v6mr12988902ybj.295.1520620961605; Fri, 09 Mar 2018 10:42:41 -0800 (PST) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id j7sm539380ywf.107.2018.03.09.10.42.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 10:42:41 -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 2/8] counter: Documentation: Add Generic Counter sysfs documentation Date: Fri, 9 Mar 2018 13:42:35 -0500 Message-Id: <06d985b7f63471c5c5b74c11eb6c76b5ff32fdd5.1520614431.git.vilhelm.gray@gmail.com> 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 userspace sysfs attributes of the Generic Counter interface. Signed-off-by: William Breathitt Gray --- Documentation/ABI/testing/sysfs-bus-counter | 120 ++++++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 121 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..64785aab1763 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-counter @@ -0,0 +1,120 @@ +What: /sys/bus/counter/devices/counterX/countY/count +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Count data of Count Y. The following data types are available: + + COUNT_POSITION_UNSIGNED: + Unsigned integer value representing position. + + COUNT_POSITION_SIGNED: + Signed integer value representing position. + +What: /sys/bus/counter/devices/counterX/countY/function +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Count function mode of Count Y; count function evaluation is + triggered by conditions specified by the countY_signalZ_action + attributes. The following count functions are available: + + Increase: + Accumulated count is incremented. + + Decrease: + Accumulated count is decremented. + + Pulse-Direction: + Rising edges on quadrature pair signal A updates the + respective count. The input level of quadrature pair + signal B determines direction. + + Quadrature x1: + If direction is forward, rising edges on quadrature pair + signal A updates the respective count; if the direction + is backward, falling edges on quadrature pair signal A + updates the respective count. Quadrature encoding + determines the direction. + + Quadrature x2: + Any state transition on quadrature pair signal A updates + the respective count. Quadrature encoding determines the + direction. + + Quadrature x4: + Any state transition on either quadrature pair signals + updates the respective count. Quadrature encoding + determines the direction. + +What: /sys/bus/counter/devices/counterX/countY/function_available +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Discrete set of available count function modes for the + configuration of the respective Count Y are listed in this file. + +What: /sys/bus/counter/devices/counterX/countY/name +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Read-only attribute that indicates the device-specific name of + Count Y. If possible, this should match the name of the + respective channel as it appears in the device datasheet + documentation text. + +What: /sys/bus/counter/devices/counterX/countY/signalZ_action +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Action mode of Count Y for Signal Z. This attribute indicates + the condition of Signal Z that triggers the count function + evaluation for Count Y. The following action modes are + available: + + None: + Signal does not trigger the count function. In + Pulse-Direction count function mode, this Signal is + evaluated as Direction. + + Rising Edge: + Low state transitions to high state. + + Falling Edge: + High state transitions to low state. + + Both Edges: + Any state transition. + +What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Discrete set of available action modes are listed in this file + for the configuration of the respective Synapse associating + Signal Z to Count Y. + +What: /sys/bus/counter/devices/counterX/name +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Read-only attribute that indicates the device-specific name of + the Counter. This should match the name of the device as it + appears in its respective datasheet documentation text. + +What: /sys/bus/counter/devices/counterX/signalY/signal +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Signal data of Signal Y. The following data types are available: + + SIGNAL_LEVEL: + Respective input has two discrete states: Low and High. + +What: /sys/bus/counter/devices/counterX/signalY/name +KernelVersion: 4.17 +Contact: linux-iio@vger.kernel.org +Description: + Read-only attribute that indicates the device-specific name of + Signal Y. If possible, this should match the name of the + respective signal as it appears in the device datasheet + documentation text. diff --git a/MAINTAINERS b/MAINTAINERS index 2be01a95b7a5..2a7bf2f84272 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3672,6 +3672,7 @@ COUNTER SUBSYSTEM M: William Breathitt Gray L: linux-iio@vger.kernel.org S: Maintained +F: Documentation/ABI/testing/sysfs-bus-counter* F: drivers/counter/ F: include/linux/counter.h