Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp992349pxb; Thu, 28 Jan 2021 05:44:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhIRUTJji/iFqJh/H6IqACfVgP678SLAncasJls3QzNWkvz1ad4qJpyyo9JFyeRIdOVbZ6 X-Received: by 2002:a17:906:53d0:: with SMTP id p16mr10801971ejo.38.1611841441480; Thu, 28 Jan 2021 05:44:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611841441; cv=none; d=google.com; s=arc-20160816; b=Dp8AwLMDqFFPwKhimSa4viDi/FCreyDYtCLInEzO6A1iG61+QDw1UtarSm6aq7ycPV /cEWTPt7Biyw7ItAVTjjxi656SIMgE6ANa2hD48ohX2uSyyNm9VR7maERTWhahs/FCfG XVQXTRKi0Zf+AGDNzJfOFSl9Cy7UDpmT2Q4vOPL0xexbva8kEf2ibOO7Go+jxO6EDkEx P2POjvXKz9uaZR9oZQBjWcO0L6pGjOKnyrm6ByWHJ2iXD/Mq8MeCHnGEPQUUmlLOx6/R fBhjviphgUkwxEziDLTrvjRvMm/2iiPi/r45RAxvjP7yg0DVYtP5zKWcga+IFDZohJPN N50Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=+1ECFLzug/K3CQ2j0o7D+rS5uVzBYuKvSYcY8ocT5po=; b=CpTFTaOZX5ENdNhcBQnjp6UQkjVQXkga+rBCYTqeuTEed3akhhngpTqHg6K48Z8vj8 ZyjZtQCsGgXBmJHVDrpUuCrrGC+qNTtCq50PKzNuQBsd3LXRgIRSrA4ke9ZiApPYfiCQ x9BOspwhhjKa8VD8+rqYoR/yY2mQC+bAw775WMNnyqdAfU80QJ6Y7WuhjN0yeJTkZtpy ubvVNQL1S5LuUr35L15H3jH1YDwo2s5h6F4KmvFcWl5Wut4Dt8ZZflWk9Y9xO03KmRtW uaM3wPzeWRaLdNZoH7yJOhTrRDL4MsTHYzPSpfeuVLpcUexg/CPHqXnRGmIGHrIDDKJK Xh+Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si2587987eji.560.2021.01.28.05.43.36; Thu, 28 Jan 2021 05:44:01 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231843AbhA1NkK (ORCPT + 99 others); Thu, 28 Jan 2021 08:40:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231509AbhA1NkI (ORCPT ); Thu, 28 Jan 2021 08:40:08 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2B8DC0613D6 for ; Thu, 28 Jan 2021 05:39:28 -0800 (PST) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l57W7-0004tf-81; Thu, 28 Jan 2021 14:39:23 +0100 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1l57W6-0005Fj-Kg; Thu, 28 Jan 2021 14:39:22 +0100 Date: Thu, 28 Jan 2021 14:39:22 +0100 From: Oleksij Rempel To: Linus Walleij Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-iio , Robin van der Gracht , William Breathitt Gray , "linux-kernel@vger.kernel.org" , Rob Herring , Pengutronix Kernel Team , David Jander , Jonathan Cameron Subject: Re: [PATCH v4 1/2] dt-bindings: counter: add pulse-counter binding Message-ID: <20210128133922.khkb4zyccoxdnlyp@pengutronix.de> References: <20210126131239.8335-1-o.rempel@pengutronix.de> <20210126131239.8335-2-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 13:43:14 up 57 days, 2:49, 33 users, load average: 0.00, 0.02, 0.00 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2021 at 09:17:23AM +0100, Linus Walleij wrote: > Hi Oleksij, > > thanks for your patch! > > On Tue, Jan 26, 2021 at 2:15 PM Oleksij Rempel wrote: > > > Add binding for the pulse counter node > > > > Signed-off-by: Oleksij Rempel > (...) > > > +properties: > > + compatible: > > + const: virtual,pulse-counter > > What is so virtual about this? The device seems very real. Currently there are two ways: 1. use "virtual" or "linux" vendor. Same as "virtual,mdio-gpio" 2. Extend the list of "not vendor" prefixes in the prefixes list: Documentation/devicetree/bindings/vendor-prefixes.yaml Since both ways seems to be valid, i personally prefer to use existing prefix instead of maintaining the vendor-prefixes.yaml @Rob, what do you prefer? > However it is certainly a GPIO counter. This was my first implementation. @Jonathan you suggest to use GPIO-free way, can you and Linus please decide what is the way to go. I personally can imagine that this driver can be attached to any IRQ source, including drivers/iio/trigger/iio-trig-sysfs.c > I would call it "gpio-counter" simply. > > Define: > $nodename: > pattern: "^counter(@.*)?$" > > > + counter-0 { > > counter@0 { > > > + counter-1 { > > counter@1 { In this case the dtc compiler will say: /counter@0: node has a unit name, but no reg property Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |