Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2735513pxf; Sun, 14 Mar 2021 09:56:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwvJyFkonDvRggAIUfjkIdIv3aGDajklKX9Z84vlwkFCdw0hwD/okOB3T32Rw1gpb7wbkx X-Received: by 2002:a17:907:75d9:: with SMTP id jl25mr19055375ejc.452.1615741019445; Sun, 14 Mar 2021 09:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615741019; cv=none; d=google.com; s=arc-20160816; b=vIKbd/OvgTvRzs0KNmHGE2y4WqKG+wz3kkPKXOrXWd/UnPtM8uhzd+V3Gk1sGPBekt IpbfTnXv3gnPb3GzYo0ASRHQ6AAUoGfZFhuieQmUYSUpaSRGE0OgPUouCNb0fS1kzl/H F7oePZpGnrcUqs//nBdkelmZrRz4zUyrv3haCTVEmlXyQlACcWFqSAFeKA8lqw6JIj3k U3VeELI668ExSjJlDPl0dbOjMCHH3Vds6HOFt4ZvfGbWT+55K0FDBuoiGr42kcsbJOPm Y5SDUY0XD2JwDi/Tg/YsSZlq9NbeAgi89xIyHzFD1YsKRGHV/dUTkLFV6EcOO/ByQXV1 iLXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=tnaJHIYyLdSjkrJ2ezOg2WkIOX+ZibKDgxQqFPQoGcs=; b=EJ1a2eVCQ2XjwVy4oSgKQoHA/WW7f6WjIYFzXe4M4Ya0VePTvtWKN1WQMj2WVd2lBj 8b2YkfFjzJBRoprxa7sk0UCK/BDm9D5okWjhZ2mA5/AChYLmd66cFQ+OeLyE8BDZIrV1 8fbJtoySrBgcdvVpHC83riHvOqoYehtMpSN9tzU6LvT5ogzHBKForvQfeVs9ygZAsRlL 4sS5irKDkZJiGdJZAiAcy7jfqlmv1Em9z6EbmCPnMEPbemMcdGX6fLVZx4JybEjocQtf /NmZ4XlAwUL4iYXqzx8oIzAXdKN9i8Tiq8WmeuqrI0X72X58l7DKFGAZr0T7S/+rgyXq wn4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si9915121ejj.88.2021.03.14.09.56.36; Sun, 14 Mar 2021 09:56:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233756AbhCNQzi (ORCPT + 99 others); Sun, 14 Mar 2021 12:55:38 -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 >