Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp512073imc; Sat, 16 Mar 2019 07:22:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRq5i/tZhpEI2tSSY9HrWA5mTZ4v73MqIMmOb7t9VvlkQvSwK/+Yrwl9aUl9av6J7JncvO X-Received: by 2002:aa7:809a:: with SMTP id v26mr9768345pff.103.1552746158171; Sat, 16 Mar 2019 07:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552746158; cv=none; d=google.com; s=arc-20160816; b=T1MxWuJhRug468NN/kiYt1sp3SQC2pnVy+aPd3u92vEEmt5oN8uOU7v3rcHfw7cLKJ gTyNQXriVlIynheWuf3YeRmxNeOBvCSUKGVd6WQySJSqfDNsu+KtT9d1jj9gVest7deE ao29J7ZNsv/EYJGU82nxZ5lEJcLr3MQ5/txRhVMxmw3qHvyhESr8D8UMsrFtVRawveXS 1dqEa4SiQLcRhq/ZkCyEoFULRJa8BfKkumKlpzbRdrPKNY0mYhoP8afhjpOgFmnNPD5L XPjThloKyFJDPGncTh+0ScsywMKZmsFANEvrjTjyae+PEYY/OGG/4huah9O4EDayOueE AyIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=mP/5GjwW343nUezStBxXS+EN+h5Bn9MZe680SUUZXEc=; b=SH44PuLocYu3Hu6jWORyttAnTBEd3ZzNuN5nKtP1kDc61r05wk8fAPTj254auETZWm TxlWlkMO3bGSO+4/r5qqVCNl5aD3CV7iIvwUzrKH9KbAEIp07IH6l3wWcD4bbQ3oJHNQ bW85rzMSDlb8Bw+EnZ7C/S2GAVdX/d8Xq6ll4h86jwEuDKxE8j8Ravz7mW+MD0LFjMDS G3vKcSSwA5DoPV7hDCmGofSPrfhIOF4U18fVkWcw2HPajSc8AgAb0lcPjVdLGzM6VxmY O4lEyCt/6ClQolX8zUIbOPU54MXsV29vNxXJXlvfSXQaGd2eOYkNXRARAwRn5ZB8pM5S 2BIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fe6PdOGD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id p188si2659273pfp.123.2019.03.16.07.22.22; Sat, 16 Mar 2019 07:22:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fe6PdOGD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726939AbfCPOVq (ORCPT + 99 others); Sat, 16 Mar 2019 10:21:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:55658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbfCPOVp (ORCPT ); Sat, 16 Mar 2019 10:21:45 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (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 B1BB821900; Sat, 16 Mar 2019 14:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552746105; bh=TLmhwtGQN4VfA785J1wHBRYladJMghsxUN/gvs2WAtQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Fe6PdOGDhGUycaeQPVznagNh/h87ljYHfugz3ota5Azqa76QT8/MPpDUfjhpDQgAJ vGRKSXM/rlzMxmMBBMI1KapR7Ls9+wdihG5JPj85l7VG9Oe+RfoudoEgtydpB3oiiH an0VU2n8chVwD8TI3MM+GqQvpaij9B1WbhcNKUI4= Date: Sat, 16 Mar 2019 14:21:38 +0000 From: Jonathan Cameron To: Rob Herring Cc: Patrick Havelange , William Breathitt Gray , Mark Rutland , Shawn Guo , Li Yang , Daniel Lezcano , Thomas Gleixner , Thierry Reding , Esben Haabendal , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2 4/7] dt-bindings: counter: ftm-quaddec Message-ID: <20190316142138.65860d88@archlinux> In-Reply-To: <20190312190952.GA18547@bogus> References: <20190306111208.7454-1-patrick.havelange@essensium.com> <20190306111208.7454-5-patrick.havelange@essensium.com> <20190312190952.GA18547@bogus> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Mar 2019 14:09:52 -0500 Rob Herring wrote: > On Wed, Mar 06, 2019 at 12:12:05PM +0100, Patrick Havelange wrote: > > FlexTimer quadrature decoder driver. > > > > Signed-off-by: Patrick Havelange > > Reviewed-by: Esben Haabendal > > --- > > Changes v2 > > - None > > --- > > .../bindings/counter/ftm-quaddec.txt | 18 ++++++++++++++++++ > > 1 file changed, 18 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/counter/ftm-quaddec.txt > > > > diff --git a/Documentation/devicetree/bindings/counter/ftm-quaddec.txt b/Documentation/devicetree/bindings/counter/ftm-quaddec.txt > > new file mode 100644 > > index 000000000000..4d18cd722074 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/counter/ftm-quaddec.txt > > @@ -0,0 +1,18 @@ > > +FlexTimer Quadrature decoder counter > > + > > +This driver exposes a simple counter for the quadrature decoder mode. > > Seems like this is more a mode of a h/w block than describing a h/w > block. Bindings should do the latter. The snag is that we need to dig ourselves out of the hole set by: fsl,vf610-ftm-pwm etc. Documentation/devicetree/bindings/pwm/pwm-fsl-ftm.txt Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt (I'm assuming these are the same IP block). Can probably be sorted out though. One core driver binds against the ftm and deals with instantiating the others depending on the configuration (note that this mode for instance does make sense in DT as it's really reflecting the fact there is a quadrature encoder connected to the ftm). Fiddly though :) J > > > + > > +Required properties: > > +- compatible: Must be "fsl,ftm-quaddec". > > +- reg: Must be set to the memory region of the flextimer. > > + > > +Optional property: > > +- big-endian: Access the device registers in big-endian mode. > > + > > +Example: > > + counter0: counter@29d0000 { > > + compatible = "fsl,ftm-quaddec"; > > + reg = <0x0 0x29d0000 0x0 0x10000>; > > + big-endian; > > + status = "disabled"; > > + }; > > -- > > 2.19.1 > >