From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3D04C3279B for ; Mon, 2 Jul 2018 19:38:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8177E25AD5 for ; Mon, 2 Jul 2018 19:38:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lechnology.com header.i=@lechnology.com header.b="irHtN4dV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8177E25AD5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lechnology.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753272AbeGBTiB (ORCPT ); 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