Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp273424imm; Mon, 2 Jul 2018 11:16:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcKK5ayDODfOM47wNAV0KvaFomqc19nVuOtvMyxuhvke1MepC96ssRwD+xIRFcMD/yYgO/a X-Received: by 2002:a62:9fd1:: with SMTP id v78-v6mr26375338pfk.233.1530555361545; Mon, 02 Jul 2018 11:16:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530555361; cv=none; d=google.com; s=arc-20160816; b=urWEbGy9N/J2L2hGlWG7zNNaB7xM1efKnKWP3gLHj7q3p6hdehWPzQmUml1KtLzJwv ZzG/S0MaH8CwkGZstxXGQz4uN9fUKXSimG93Xs5ArfaWIzVWE7n5wKCzv3s6aDB9O+jG JBRh2jPHXx9p5r9nU1Vm5+uImsJmGuyA+ICUsrIWQo/0yl15wDt8AcGk2R2ieARcALfI e+ND0WQeYJ1SmfbjRLcASmH5Ew87tPMwWdKrqGnYTa7Ky7kKDmf9WzyUgDlYHWuKPj9+ PJf89WAWuPL4EKb9SVFSzSU4cN91/+f/gQXkCBiEDIAu1ueIRkAYoVhZBm2W9zy5koUh fzoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=ssqodhSvXYROAXc666CT4w7IS1FPO3p8Yl0pAruNXnA=; b=krTLk1ImVIX1lXq6Y6jB/kfe+Hn/ljIB8BuQ5IOKZA5lxJxGOiAh+GUmvpth+aYR5D iYKS/7mRNPPjGcZrKdNGUe5Dg0UfitY8WZKo9rOGvTyEhlDsgKQz+ZnF2g/G32CROqwJ ugmcUPY0hkKLzwxbF+DRPxKK4QGeIrjMIJtshjYe5h11ANb7M5HKs2m2IRaGYT+awntV ESV1PX30kdWinZO+Q31szDaIiVWpR8FbIRKop5GUI7xeFi+O6rtYeLaBEnY/OcLf2D5o 77tazogN7LIfvDtnw28zXmd/AHDPLfhvbeSDQQZj5qpl7sbQPQpXGAL8ynbTReGEi6et RJqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=pSt6IkQp; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7-v6si14553247pgp.434.2018.07.02.11.15.46; Mon, 02 Jul 2018 11:16:01 -0700 (PDT) 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=fail header.i=@lechnology.com header.s=default header.b=pSt6IkQp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753497AbeGBSNs (ORCPT + 99 others); Mon, 2 Jul 2018 14:13:48 -0400 Received: from vern.gendns.com ([206.190.152.46]:44459 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753194AbeGBSNp (ORCPT ); Mon, 2 Jul 2018 14:13:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ssqodhSvXYROAXc666CT4w7IS1FPO3p8Yl0pAruNXnA=; b=pSt6IkQpZQhTSi7gkQtWZVunnh 6tDwNnzPY8ZT9KKa708CccXJS/ms6p/CTzKDI7qFbNVo8r6KMzT+At3Eon0SSycgINP83TFfZ36yy rVQLLY4x8aBS0Hc08nNbf8qwCvFRVFFAKP22LQc8FiKMa0s98YKQZlNEdeKrhDchVbseH4HF1YNX5 /QAWQ5Q32S+ipSQX9FVCrir9Jx+0pSSi9qhS3T0w7kBc7S+Nixjg/pmjBxnD9WsPs8RttFIuQaN8J 484FTBgjG1H/LeQsAQqFwkUhY2rgxI4R0skhlfplWAFsTITz2DlB33mf7J0vuFXnlY35zuR/MmJu9 PrvVzSbQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:35132 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fa3KY-00DgCc-R3; Mon, 02 Jul 2018 14:13:42 -0400 Subject: Re: [PATCH v7 00/10] Introduce the Counter subsystem To: William Breathitt Gray , gregkh@linuxfoundation.org Cc: jic23@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, fabrice.gasnier@st.com, benjamin.gaignard@st.com, robh+dt@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, mark.rutland@arm.com References: From: David Lechner Message-ID: <603b0373-f1e1-5938-fa53-8328c9a5964f@lechnology.com> Date: Mon, 2 Jul 2018 13:13:40 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/21/2018 04:06 PM, William Breathitt Gray wrote: > I decided to strip down these devices to arrive at the core essence of > what constitutes a "counter device" and therefore design a "generic > counter" abstraction to better represent these devices and prevent the > ambiguity we discovered with the existing IIO Counter interface. This > abstraction became the Generic Counter paradigm, which is explained in > detail within the Documentation/driver-api/generic-counter.rst file > introduced by this patchset. I'm curious if you have given any thought to the time aspect of counters. I am interested in the rate at which the counters are counting (e.g. how many counts per second). I realize that you can calculate this in userspace or in the kernel using the system timer, but it is not very accurate since Linux is not a realtime OS. So, I would like to get the rate directly from the hardware. For example, the TI eQEP[1], like the one found in BeagleBones, has a couple ways of measuring time (see link for details). [1]: http://www.ti.com/lit/ug/sprug05a/sprug05a.pdf