Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4718403imm; Fri, 18 May 2018 09:30:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrgkx9emkuaQ4E9fP/yWHkeRRJfUjCPhhXxi3R1TOnV2YvsL3R5hIpRidDMe5dYZemv2jdM X-Received: by 2002:a65:5244:: with SMTP id q4-v6mr7983407pgp.201.1526661004457; Fri, 18 May 2018 09:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526661004; cv=none; d=google.com; s=arc-20160816; b=kf97nOh84WBcMRxObfoC+w5D8aWgZdlSMcFUJXnqrpPJOTxn+kNMlWBNokZwPzfVXh yz1+cOperxAqIk7wsapg83UgaiwqM/CqfsO5jgnVW3iggFmfULGobfi6yrDuW2rqmMuz 7g0J7C7OHNx6dftLSkdhCcVEDNAt9HIzOnDTYXUnASohLwsOY7A8HMT/+7iGOXd2OULe EbmJf0vmh8cCj/GNYNcF1XIG/fsMcP6I1xVFS17aBwdqlG+VnJqaNPMYwbBbRgn1CCgD cTykHSCzCg74xRj5KaRe6kmIr80NiKAzjx4bZIB5ctaqQdxw3wpOmXD+HKbFmSiWzrxV Utng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=i7OzHxJg2oltIo7/d0n/WoIstKC5CvD3hHCzXQKRFjw=; b=Guk9IBABuRX5EHO22TCkakIM/CkPCyQ1yW3muF6xDBGSxi1L7rr0aYfCzHiL6K1xUe 3k5JXXeem0tcl3yPW0pVk/7c7mECZeHNT1Y0SNjYOIjwLWVgbxEShsgCjWL/wMiZV2W+ sgdFi3KzeJFGGipEvcODEGerykdlNt25IBHlwj1RDCVMNZKh9dV05LsIiCzw8YFrQ3ZW pzXo4sJLoBqAYZHhZO5KGq0R9cwSEc2gPXmlFsWhbU8uJY0z2iQd3yA+xm2ite+3qz8d h321CCX0wdx7UfeWW8LrLp+89gjfOkhxOA+jrlIro307fBmsak1rzurRNT1Ozg7kGh0b 3jcA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 l33-v6si7455429pld.440.2018.05.18.09.29.48; Fri, 18 May 2018 09:30:04 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752026AbeERQ2Z (ORCPT + 99 others); Fri, 18 May 2018 12:28:25 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:43801 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbeERQ2W (ORCPT ); Fri, 18 May 2018 12:28:22 -0400 Received: by mail-oi0-f66.google.com with SMTP id p62-v6so7615564oie.10; Fri, 18 May 2018 09:28:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=i7OzHxJg2oltIo7/d0n/WoIstKC5CvD3hHCzXQKRFjw=; b=JPDlnjtklVdqoAp4z0xB4TYaZ2Z4hLhhEQXZwW5Qv17l521Y63ZDaaKg+lZpuoDnt2 SyVSRxZf6o/RlOCmN9EUuq7YonDdHMUZK/+ystFlgJKJtEWi4rSrNgwz3n9WH9Bwchtp nqAg2fObCfvJIfCrWAzZf78xZF9uUXl/cXQ3ZBGH62A1/GiwiZrVeBN806cZOcPYETGM rcU2mKQm7rZ3AQw/Av1IySs8hNFpPN8TIfM8d0OYQw3WGBNZRDj5UK+h9zuB5LyMdfeJ vrJpVOR9/nIFBczDtr/66AL4n0voAPHHtcU+j/x2ZQObLVGlVAfYSAX4xVpv5NqDS9B6 HZEA== X-Gm-Message-State: ALKqPwfL0RUEmWdSc7yNrypYajd59s/BpGawQrI7K347aAvJ+5dgHTu9 mtYO7f+5oNwrIeE7N8PsEw== X-Received: by 2002:aca:dd46:: with SMTP id u67-v6mr5563406oig.355.1526660896570; Fri, 18 May 2018 09:28:16 -0700 (PDT) Received: from localhost (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.gmail.com with ESMTPSA id k54-v6sm5320998otb.49.2018.05.18.09.28.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 May 2018 09:28:15 -0700 (PDT) Date: Fri, 18 May 2018 11:28:15 -0500 From: Rob Herring To: Benjamin Gaignard Cc: William Breathitt Gray , Mark Rutland , devicetree@vger.kernel.org, Benjamin Gaignard , linux-iio@vger.kernel.org, "linux-kernel@vger.kernel.org" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Fabrice Gasnier , Jonathan Cameron Subject: Re: [PATCH v6 6/9] dt-bindings: counter: Document stm32 quadrature encoder Message-ID: <20180518162815.GA24966@rob-hp-laptop> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2018 at 08:59:40PM +0200, Benjamin Gaignard wrote: > 2018-05-17 18:23 GMT+02:00 Rob Herring : > > On Wed, May 16, 2018 at 12:51 PM, William Breathitt Gray > > wrote: > >> From: Benjamin Gaignard > > > > v6? Where's v1-v5? > > > >> Add bindings for STM32 Timer quadrature encoder. > >> It is a sub-node of STM32 Timer which implement the > >> counter part of the hardware. > >> > >> Cc: Rob Herring > >> Cc: Mark Rutland > >> Signed-off-by: Benjamin Gaignard > >> Signed-off-by: William Breathitt Gray > >> --- > >> .../bindings/counter/stm32-timer-cnt.txt | 26 +++++++++++++++++++ > >> .../devicetree/bindings/mfd/stm32-timers.txt | 7 +++++ > >> 2 files changed, 33 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt > >> > >> diff --git a/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt b/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt > >> new file mode 100644 > >> index 000000000000..377728128bef > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt > >> @@ -0,0 +1,26 @@ > >> +STMicroelectronics STM32 Timer quadrature encoder > >> + > >> +STM32 Timer provides quadrature encoder counter mode to detect > > > > 'mode' does not sound like a sub-block of the timers block. > > quadrature encoding is one of the counting modes of this hardware > block which is enable to count on other signals/triggers You don't need a child node and compatible to set a mode. > >> +angular position and direction of rotary elements, > >> +from IN1 and IN2 input signals. > >> + > >> +Must be a sub-node of an STM32 Timer device tree node. > >> +See ../mfd/stm32-timers.txt for details about the parent node. > >> + > >> +Required properties: > >> +- compatible: Must be "st,stm32-timer-counter". > >> +- pinctrl-names: Set to "default". > >> +- pinctrl-0: List of phandles pointing to pin configuration nodes, > >> + to set IN1/IN2 pins in mode of operation for Low-Power > >> + Timer input on external pin. > >> + > >> +Example: > >> + timers@40010000 { > >> + compatible = "st,stm32-timers"; > >> + ... > >> + counter { > >> + compatible = "st,stm32-timer-counter"; > > > > Is there only 1? How is the counter addressed? > > Yes there is only one counter per hardware block. > Counter is addressed like the two others sub-nodes and the details > about parent mode are describe in stm32-timers.txt > Should I add them here too ? so example will be like that: No, you should drop the child node and add pinctrl to the parent. Any other functions this block has that you plan on adding? Please make bindings as complete as possible, not what you currently have drivers for. > timers@40010000 { > #address-cells = <1>; > #size-cells = <0>; > compatible = "st,stm32-timers"; > reg = <0x40010000 0x400>; > clocks = <&rcc 0 160>; > clock-names = "int"; > counter { > compatible = "st,stm32-timer-counter"; > pinctrl-names = "default"; > pinctrl-0 = <&tim1_in_pins>; > }; > }; > > Benjamin > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel