Received: by 10.223.185.111 with SMTP id b44csp635329wrg; Fri, 9 Mar 2018 10:44:12 -0800 (PST) X-Google-Smtp-Source: AG47ELsOl9pMYTJraEcX5NgRaf25A0p8ukwTMUYfGS8vsz/ISUWFDk9Adyt3UtOMeTSRvPfZN8HM X-Received: by 10.99.105.70 with SMTP id e67mr25051461pgc.342.1520621051892; Fri, 09 Mar 2018 10:44:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520621051; cv=none; d=google.com; s=arc-20160816; b=IQ9KDC27N69ewZaJwlWGCQpmrZhu0YnoB/XpwROfyelY279R/7d0h047wRCohURrT3 3i30DqP9n/e5ky2fyznd/fDxhDLnMsO/wWXjcneiXjR4VZ1mcj6dEEisllZ8loov8noC dgrBB0qjhmKZeKiI4Dd8VEqFbyp9tC7f9S3P/AslLCsseTLqwHkOuPjzHXfwDFjqldQB JyN+BSLkW6ACmVsQckWVtywXecvgZgOa5XQsvx+xFNk0UCuvS5OirDuBYkCJ9V7ZtFeU tiG0buDLIWVaienL7/mLvpLqKtRi/9GedtTgJiElLh/tid3n+KA502Zc0zudXYmb+PPL zjjg== 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=FdN1rGtLJ5mGLzaTj1wsQ6OSTFu1oQ/UlwcTi+6Xo5g=; b=gfqUtmAwiDpn7i9JNXj81M2R4rSgsmdDOyvkAIiRNCrGMLWgJ5MRHL/z08J2oeoHak sKrSbJ+sqgEGpYzy2f8dsx6nwlesv7AfZm23n8cbiH77z5bNbP5aZ0L8w0lhp1l0vobt 4IkUSWJU3A+QGXhXd7ZPy9toRG2S/fpyM5IFfiu95f6/McBCSSephatVJx3bw1lmuIU9 GjdHKfeunk01UKxMyGXTFrwuRZtgWCPYjzoR2pjmyR80eHlXe98FHtNPA8H/OPbP4kkn 3TpLMoqAluITSZPrcqNYJNSCNPtZNshYAV3ztXPLjKEARQiRt8SAaTIFaA0cajGlJZhW bOnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EEUaLMqb; 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 x75si1280761pff.339.2018.03.09.10.43.56; Fri, 09 Mar 2018 10:44:11 -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=EEUaLMqb; 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 S932486AbeCISmq (ORCPT + 99 others); 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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.16.2