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=-10.5 required=3.0 tests=BAYES_00,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable 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 3A913C433E9 for ; Sun, 14 Mar 2021 16:56:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1F3B64DE1 for ; Sun, 14 Mar 2021 16:56:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233927AbhCNQzk (ORCPT ); Sun, 14 Mar 2021 12:55:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:55980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbhCNQzJ (ORCPT ); Sun, 14 Mar 2021 12:55:09 -0400 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C9CA64DE1; Sun, 14 Mar 2021 16:55:07 +0000 (UTC) Date: Sun, 14 Mar 2021 16:55:04 +0000 From: Jonathan Cameron To: Oleksij Rempel Cc: Rob Herring , William Breathitt Gray , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team , David Jander , Robin van der Gracht , linux-iio@vger.kernel.org, Linus Walleij Subject: Re: [PATCH v8 0/2] add support for GPIO or IRQ based event counter Message-ID: <20210314165504.536d9ba6@archlinux> In-Reply-To: <20210301080401.22190-1-o.rempel@pengutronix.de> References: <20210301080401.22190-1-o.rempel@pengutronix.de> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Mar 2021 09:03:59 +0100 Oleksij Rempel wrote: > changes v8: > - use use enum index instead of enum value for the counter function > - register signal unconditionally and return error is signal revel is > read > > changes v7: > - make most of structs dynamically allocatable to assign IRQ based > description to the signal > - assign dev name instead for driver name to the IRQ > > changes v6: > - rename it to interrupt-counter > - driver fixes > - device tree fixes > > changes v5: > - rename it to event counter, since it support different event sources > - make it work with gpio-only or irq-only configuration > - update yaml binding > > changes v4: > - use IRQ_NOAUTOEN to not enable IRQ by default > - rename gpio_ from name pattern and make this driver work any IRQ > source. > > changes v3: > - convert counter to atomic_t > > changes v2: > - add commas > - avoid possible unhandled interrupts in the enable path > - do not use of_ specific gpio functions > > Add support for GPIO based pulse counter. For now it can only count > pulses. With counter char device support, we will be able to attach > timestamps and measure actual pulse frequency. > > Never the less, it is better to mainline this driver now (before chardev > patches go mainline), to provide developers additional use case for the counter > framework with chardev support. > > Oleksij Rempel (2): > dt-bindings: counter: add interrupt-counter binding > counter: add IRQ or GPIO based counter Series applied to the togreg branch of iio.git and pushed out as testing. thanks, Jonathan > > .../bindings/counter/interrupt-counter.yaml | 62 +++++ > MAINTAINERS | 7 + > drivers/counter/Kconfig | 10 + > drivers/counter/Makefile | 1 + > drivers/counter/interrupt-cnt.c | 244 ++++++++++++++++++ > 5 files changed, 324 insertions(+) > create mode 100644 Documentation/devicetree/bindings/counter/interrupt-counter.yaml > create mode 100644 drivers/counter/interrupt-cnt.c >