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=-8.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 84C90C433DB for ; Wed, 30 Dec 2020 18:20:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 326A62222A for ; Wed, 30 Dec 2020 18:20:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 326A62222A 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-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=F2y3govCNSvyGjp92m0r2Guz1N0YF3Xxc5Yop8ozV/Y=; b=DaqokpTSCpVt/uKx8tlE/exvK 48I1AYX4HTEsk3A4EertgMKwSguHdY1+FRZw8nJT1uHKFfPKaGQNsWFKBrBVGaJlPyapKxa5lLdZ5 fnMmk25Aeor6ZYUlKboZYctJwdV7QBDANbxuCF0eB97SFKB87y5y72GxPeipwmTCBuHkuxEa/wPFS 4FZEii3KOlSjkAcAgsCV0MGsEHULzM/fy5Z/6mKfFyVx6Z0D9/8IJvUdtW3EjIj28BD7dtjebsbkA 1nxoQSlXy9Scn6SNivmSYeYEBATeM11nmmhs2VBowSF87q1m8JJg4zA1BfBSlRssZf9dNiGHmlaeT EcfZiodWg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kug3m-0007ev-LM; Wed, 30 Dec 2020 18:18:58 +0000 Received: from vern.gendns.com ([98.142.107.122]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kug3j-0007cg-RK for linux-arm-kernel@lists.infradead.org; Wed, 30 Dec 2020 18:18:56 +0000 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=O9mAikuge8pWDxbxgmMYsQbwjgUOHpJq51Q8DnCsMXQ=; b=SzEj0GC0ZBhffp0IlIIHKLzDUC II8ujY8T84xu/SPS6I3m3I6DqFajTGL/rAd4WelaIQ8CLxR0lQzjWSnHTRKAukt7DLK8p0lMlPQAn l5RkqPnSkZlDn3tIEeGpaO4Z9QKFKXRqwUuEJFoQIEg62Zku51eW8AYz6+iyBBP5ptJYpCxp9Th6H xMGAxGJeug8IKKe/+x6/WANr9j4QpEgSqqWjNn5yF3jweHtmKdhfFALGLO14aTXOIufwvY1wWZjAY jEQTXzWk0OL5OKZAsdy6usEdIPu7Pgd91RTUy6X2ibjdd5ELX5rmHEIGQPAHulBqycCTf8dcEPRvc 2KkuIzeQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:59368 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kug3e-00030h-5O; Wed, 30 Dec 2020 13:18:50 -0500 Subject: Re: [PATCH v7 4/5] docs: counter: Document character device interface To: William Breathitt Gray , jic23@kernel.org References: <1e69b7beae4cf352bddb379220d0d52b20db0634.1608935587.git.vilhelm.gray@gmail.com> From: David Lechner Message-ID: <416fe56e-bfb3-3f46-7f03-17009fa27dee@lechnology.com> Date: Wed, 30 Dec 2020 12:18:48 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1e69b7beae4cf352bddb379220d0d52b20db0634.1608935587.git.vilhelm.gray@gmail.com> Content-Language: en-US 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 - lists.infradead.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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201230_131855_997348_8ACFF85A X-CRM114-Status: GOOD ( 11.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kamel.bouhara@bootlin.com, gwendal@chromium.org, a.fatoum@pengutronix.de, mcoquelin.stm32@gmail.com, linux-iio@vger.kernel.org, patrick.havelange@essensium.com, alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, kernel@pengutronix.de, fabrice.gasnier@st.com, syednwaris@gmail.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, alexandre.torgue@st.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/25/20 6:15 PM, William Breathitt Gray wrote: > +Userspace > +--------- > +Userspace applications can configure Counter events via ioctl operations > +on the Counter character device node. There following ioctl codes are > +supported and provided by the `linux/counter.h` userspace header file: > + > +* COUNTER_CLEAR_WATCHES_IOCTL: > + Clear all Counter watches from all events > + > +* COUNTER_ADD_WATCH_IOCTL: > + Add a Counter watch for the specified event > + > +* COUNTER_LOAD_WATCHES_IOCTL: > + Activates the Counter watches added earlier Would it make more sense to call the last and first ones COUNTER_ENABLE_EVENTS_IOCTL and COUNTER_DISABLE_EVENTS_IOCTL? In any case, more explanation would be helpful. * COUNTER_ADD_WATCH_IOCTL: Queues a Counter watch for the specified event. The queued watches will not be applied until COUNTER_ENABLE_EVENTS_IOCTL is called. * COUNTER_ENABLE_EVENTS_IOCTL: Enables monitoring the events specified by the Counter watches that were queued by COUNTER_ADD_WATCH_IOCTL. If events are already enabled, the new set of watches replaces the old one. Calling this ioctl also has the effect of clearing the queue of watches added by COUNTER_ADD_WATCH_IOCTL. * COUNTER_DISABLE_EVENTS_IOCTL: Stops monitoring the previously enabled events. > + > +To configure events to gather Counter data, users first populate a > +`struct counter_watch` with the relevant event id, event channel id, and > +the information for the desired Counter component from which to read, > +and then pass it via the `COUNTER_ADD_WATCH_IOCTL` ioctl command. for restructured text, two backticks are needed for ``code`` formatting _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel