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=-6.3 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,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 A1DDDC433DF for ; Thu, 30 Jul 2020 22:51:54 +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 6928E20829 for ; Thu, 30 Jul 2020 22:51:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bvI3xCUn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lechnology.com header.i=@lechnology.com header.b="yMlsUfvi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6928E20829 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:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z5HriVYNvMQ0mHpxTpPXF5ImY1kdQRev0MdnoHRe8Rc=; b=bvI3xCUnIuufx3UeunGp+qVlm eJr6F0rmduaPmzEPYbRiCz2TQlB+HV3sWbouFP6fqudbjqK/GHyZwUwFLqCqTC8B8165cynTkad0a zFHPtqpwMmMkHA+LKNTrj9JWymnnjw+gR4CK3h1Vd4zs9UZ8gDKWSjAyAV41Rz4kyk0gIpXBctku4 B5N30lr9FF95mALqsPZzy3e6hGGUYCmz2ZAVk1fCx434zSo66KBMaKeD5arlu6IDBKULX7rbEUiOx ifA4872MDvQaZlBKYuhc+Je7aNhuEHU6o5M0kH+Xbfi1PiQDmPm0ueB5rI0VWxnFMNIQa1hT/nrYt B13Hz4bag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1HNc-0007al-7v; Thu, 30 Jul 2020 22:50:28 +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 1k1HNZ-0007VS-SE for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2020 22:50:26 +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:References:Cc:To:From: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=zIBbAfaKyv0a8khPFENs9bkRVRW75g282kFb88ll0RE=; b=yMlsUfviYgQGqrsCcQwvQ+E9+4 n4HKPHVxV3jzQ0oWcZAvtI+PY5km7eQGTZuzRA+5HkyL3yRKEHfiB66jyo5qY/YRP4HQzz/bszsyx Vts7C81XDbxzeLVlXwom6UzAcjLyuwI9G5Ea6LNcZflptu7rpAUOzeSl0Icuz7PcsMCBpDF+sKey6 Jr8XysA3pCKftO59vuP+H+1BDP4xx8gYeJDPC7/sJkSX2YPRW/S5umktLVAvBDGdw+QXbLUfWr0WX MDFEQBcVcSTqMtPZ/ING/CB1LVxJPdlHg/SvDtc6eOCZ+yeL+Ghku7zua54tD4t+znNRxeX8OgtmW 8b2McVaQ==; Received: from [2600:1700:4830:165f::19e] (port=45352) by vern.gendns.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1k1HMq-0000Lv-I2; Thu, 30 Jul 2020 18:49:40 -0400 Subject: Re: [PATCH v4 3/5] counter: Add character device interface From: David Lechner To: William Breathitt Gray , jic23@kernel.org References: <08b3ac7349a59ba7fa5cd438bbe78360842ccd11.1595358237.git.vilhelm.gray@gmail.com> <415ee9ad-255e-cee7-22a6-ffa977999691@lechnology.com> Message-ID: Date: Thu, 30 Jul 2020 17:49:37 -0500 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: <415ee9ad-255e-cee7-22a6-ffa977999691@lechnology.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-20200730_185026_016882_9786373C X-CRM114-Status: GOOD ( 15.43 ) 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, alexandre.torgue@st.com, linux-iio@vger.kernel.org, patrick.havelange@essensium.com, alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, mcoquelin.stm32@gmail.com, fabrice.gasnier@st.com, syednwaris@gmail.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org 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 7/28/20 7:20 PM, David Lechner wrote: > On 7/21/20 2:35 PM, William Breathitt Gray wrote: >> This patch introduces a character device interface for the Counter >> subsystem. Device data is exposed through standard character device read >> operations. Device data is gathered when a Counter event is pushed by >> the respective Counter device driver. Configuration is handled via ioctl >> operations on the respective Counter character device node. > > This sounds similar to triggers and buffers in the iio subsystem. And > I can see how it might be useful in some cases. But I think it would not > give the desired results when performance is important. > By the way, I really appreciate the work you have done here. When reviewing code, it is easy to point out what is wrong or we don't like and to not mention all the parts that are good. And there is a lot of really good work here already. I've been working on this all week to try out some of my suggestions and I'm not getting very far. This is a very difficult problem to solve! I just wanted to mention this since I responded to this patch series already but I am still learning and trying things. So I may have more/ different feedback in the future and I may decide some of my suggestions are not so good. :-) And one more thing, there was a nice talk at the Embedded Linux Conference last month about lessons learned from designing a userspace API for the GPIO subsystem [1]. Unfortunately, there is no video yet, but the slides might have some helpful ideas about mistakes to avoid. [1]: https://elinux.org/ELC_2020_Presentations _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel