From patchwork Thu Dec 14 20:52:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 10113313 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 1637F602B3 for ; Thu, 14 Dec 2017 20:53:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07C9329D35 for ; Thu, 14 Dec 2017 20:53:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0430029D29; Thu, 14 Dec 2017 20:53:02 +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 96ECC29D31 for ; Thu, 14 Dec 2017 20:53:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753594AbdLNUww (ORCPT ); Thu, 14 Dec 2017 15:52:52 -0500 Received: from mail-yb0-f193.google.com ([209.85.213.193]:37429 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753349AbdLNUwt (ORCPT ); Thu, 14 Dec 2017 15:52:49 -0500 Received: by mail-yb0-f193.google.com with SMTP id 5so4525463ybp.4; Thu, 14 Dec 2017 12:52:48 -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=viJ3Oh7Mg1dPNpAaPY4g9ef5mcUmEcjfFtjb8iu2BrU=; b=GqFgaJyRukK42asfxCQqnjRXqwNgTWrl+jznjedYsoFbuprk5vOpudE07zdcygiH+R 8wUMHiEOSYus1BnJtpcZa7IUCW4hiFVifnwuQVYAKakkWS9lNsS3eKkcjSH/KMyFEtlh odMgUY6g8QTFrqz8AnGf8s+s2njdz/7FBzJcA5srwp0O9x5PxzSke2SS3ZZlklLNcac7 Y7yNa4HZovieVnvFAMRQUb/mgvqXlg5xBxnx0gF7ZKRhh8cqc3o63M+gLm9vB4WurD/n Pj9IQz3GpxxxUXrU7td6WgiwN7uNMnSsU7MA1Mr0WJSGtF6otNq/R/3O+Bxkm3tXJV63 kisA== 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=viJ3Oh7Mg1dPNpAaPY4g9ef5mcUmEcjfFtjb8iu2BrU=; b=QKyYtQ/MVGZ9DszYW4/Pjm8dsLFDdk0aCjXbkQEseRFWOuBm6tmy0itJtlCSsg0urF 049g/KnqNDKL/5gFcoFKjfl8VcafMdZkVevqdNPT3twd6l7GcAei49/TEvbs8xYxLTrz lRPbomK7bdi9k9J1jZIc/13vJhTw+uLSibQk8dUYDAtT2/bhS78MIehZpu7E44to6rwZ Y0VuhXlmvg6RrWlg8V8VHLtf85xxhHKSTqQi8lwNYscOaMyxuLiYVT+lWMFmn+vSfXbh xOFSrMFfZ+eJ5Bb4QDy9DZlr0fEueuKZV0Lfx4PotrdnrCpz5zpfSrlfGN89fdIY8xwt QBxg== X-Gm-Message-State: AKGB3mKPidbgxTVw9et19YbNcThfA9qmMqJlShFN4dPIjRm5MuvOqntj sFSrwlJBz3sWVs3HP9GX5Y8= X-Google-Smtp-Source: ACJfBosrFiEnoRkxfFDYmzOY73g24jjrpa1BUvzsNaJpD0KmGdCE35JyuzbfE9nfWDmvVAbeHhSctg== X-Received: by 10.37.172.222 with SMTP id x30mr5152208ybd.373.1513284768183; Thu, 14 Dec 2017 12:52:48 -0800 (PST) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id x134sm2161301ywg.15.2017.12.14.12.52.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Dec 2017 12:52:47 -0800 (PST) From: William Breathitt Gray To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: benjamin.gaignard@linaro.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray Subject: [PATCH v4 09/11] counter: Documentation: Add Quadrature Counter sysfs documentation Date: Thu, 14 Dec 2017 15:52:41 -0500 Message-Id: <875b929895c1f38972c921c7591bb8370e8e9163.1513266127.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.15.1 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 Quadrature Counter interface. Signed-off-by: William Breathitt Gray --- .../ABI/testing/sysfs-bus-counter-quadrature-sysfs | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-counter-quadrature-sysfs diff --git a/Documentation/ABI/testing/sysfs-bus-counter-quadrature-sysfs b/Documentation/ABI/testing/sysfs-bus-counter-quadrature-sysfs new file mode 100644 index 000000000000..69d1a3e4a1a5 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-counter-quadrature-sysfs @@ -0,0 +1,76 @@ +What: /sys/bus/counter/devices/counterX/countY +KernelVersion: 4.16 +Contact: linux-iio@vger.kernel.org +Description: + Count data of Count Y. This is a signed integer value that + represents the position. Typically, this is determined by + hardware evaluation of the quadrature encoding input signals. + +What: /sys/bus/counter/devices/counterX/countY_direction +KernelVersion: 4.16 +Contact: linux-iio@vger.kernel.org +Description: + Count direction of Count Y. Typically, this is determined by + hardware evaluation of the quadrature encoding input signals. + Two count directions are available: forward and backward. + +What: /sys/bus/counter/devices/counterX/countY_function +KernelVersion: 4.16 +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. Four count function modes are available: + pulse-direction, quadrature x1, quadrature x2, quadrature x4. + + 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_signalZ_action +KernelVersion: 4.16 +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. Four action modes are available: none, + rising edge, falling edge, and both edges. + + 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/signalY +KernelVersion: 4.16 +Contact: linux-iio@vger.kernel.org +Description: + Signal data of Signal Y. This is the respective input level + represented by two available states: low and high.