Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp349398imm; Mon, 2 Jul 2018 12:40:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIuyG0PUN+WL42LhaPL2MA9kJP2oW+2R+xToWshVYDW7KmSrIbOngQ8Pqb/BFn41A+FzHPm X-Received: by 2002:a63:ba43:: with SMTP id l3-v6mr22216965pgu.295.1530560413306; Mon, 02 Jul 2018 12:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530560413; cv=none; d=google.com; s=arc-20160816; b=YZuhWxy2X6nW0XJRXJlTvfxJwIhcRmOfe13CInCqU63IEExBHY7BbQrKpuvcp3kUoE CaVnlM6sbxyjH3ZFpMX19YU+wpbzTaJenxo+HBXLjGkyaKq9owpdWc5FVN389a7aJ2/H dA0ppD0jTLg8IM7fwehb5Znn7DqGn+60ETfetxS3f/4Lms/BRx4knOxIP/G0PkMw2TOW AT1hv5HgtRvYulO/H0xhyRQxoVw9F5WwyNAF2Q3YtveL0PVedl27h6gAVe8ni89tQe59 WbZi6NqrKeVQ8ueM9fKQpfcjIP6EGcru0GFpuCiXu9YhRUvU3nhk53z5bdhpiPM/O88L Z66g== 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=vmChzewAc6ubkt6N3tDVw+AZ0MRL3p1kDpizcU88RkI=; b=Urd2LX/jIIm5FG5IyoBuvfrpphwS8BZtkT6byWEl1T3FTLq+1sk1Th7zleo2nXvyK5 0MrARDGi1p2d+zMs93lhcOxlZgXE3ltuyJh+H61iFlSiREgPqnepqUJ1HHqk0bL/KjjH qPZ1xgsHlKq1OrghFv3V57g0ONuBNXu/5mHS4hzFuGPODUjNO79QvcSJcxj9AmS5ambM s+KSTONBZpQPY44U1OSN3Z1L8unknukoewMxXLTiUyLA6djo5jj5EPD3j0vBvFYq7kXJ AyAodEzeW2JwcKJ37LTyRFQCgjU9DPvkOB5HCgZC1UHfyp0MRPVm6t+MA6jQbanbJ+i6 IgIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=irHtN4dV; 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 b17-v6si16461859pls.467.2018.07.02.12.39.58; Mon, 02 Jul 2018 12:40:13 -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=irHtN4dV; 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 S1753247AbeGBTiB (ORCPT + 99 others); Mon, 2 Jul 2018 15:38:01 -0400 Received: from vern.gendns.com ([206.190.152.46]:47095 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752458AbeGBTh6 (ORCPT ); Mon, 2 Jul 2018 15:37:58 -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=vmChzewAc6ubkt6N3tDVw+AZ0MRL3p1kDpizcU88RkI=; b=irHtN4dVHWBfDcOQFHt7hIUTyd O4MvQ9JjkMJeUvv6k7Lf+UwlpDJHq7HR5M/Cr03uyK59GzUJmHsVgL/n1G4xX0rx/NWlEqTJZGfBo 0g+B/F+7DIcogrUXIqSZ6zbXOxm02FQjMSnqfayddeG4z3SluZCNPqATH0G1kLYg/fxupbjG6Uqlj CbRnh7uMNaW7zypv00MgScEg1zURkC7ls0aAKQnyJ5g9CviWOqZPi2OAT8HaURVMgg/vTFJ8Fm0l/ VrWWjmwSL7bpFoy7SJoFQK8sNr7A+BbEvylvUemFiXVjG3Wgc7Tk5HzeCLUDhg9PRRNzaTd/LGe/a A/1akRpQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:36516 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 1fa4e3-00DuFA-Q7; Mon, 02 Jul 2018 15:37:55 -0400 Subject: Re: [v7,03/10] docs: Add Generic Counter interface documentation 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: <7606bdc53c26c332b2bbff0f865380fb0e874b56.1529607879.git.vilhelm.gray@gmail.com> From: David Lechner Message-ID: Date: Mon, 2 Jul 2018 14:37:53 -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: <7606bdc53c26c332b2bbff0f865380fb0e874b56.1529607879.git.vilhelm.gray@gmail.com> 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:07 PM, William Breathitt Gray wrote: > +Userspace Interface > +=================== > + > +Several sysfs attributes are generated by the Generic Counter interface, > +and reside under the /sys/bus/counter/devices/counterX directory, where > +counterX refers to the respective counter device. Please see > +Documentation/ABI/testing/sys-bus-counter-generic-sysfs for detailed > +information on each Generic Counter interface sysfs attribute. > + > +Through these sysfs attributes, programs and scripts may interact with > +the Generic Counter paradigm Counts, Signals, and Synapses of respective > +counter devices. > + Have you considered a character device in addition to the sysfs interface? I basically have many of the same concerns that resulted in a char dev for gpio[1]. - With sysfs, you *can* technically poll for events, but then you have to seek and read or re-open the file. - File permissions are annoying if you want a non root user to be able to use the device. - A single program can't claim exclusive access to a device. - There is no automatic cleanup if a userspace program accessing the device crashes. [1]: https://www.elinux.org/images/7/74/Elce2017_new_GPIO_interface.pdf