Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3636149imm; Thu, 17 May 2018 12:00:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrZxVs7iTJLYJ6gayJfcYiP8a2+QTd7s/lyq44i+RVzniF0lChZ8FPqgjydhY03bD11tg+y X-Received: by 2002:a62:9515:: with SMTP id p21-v6mr6251280pfd.62.1526583614731; Thu, 17 May 2018 12:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526583614; cv=none; d=google.com; s=arc-20160816; b=dFfIVyRTSSr2j8a9t2lLPsnBHzKwrICUTGPuFQ8QSXgndUw6GKhiid6n+4M6dDpLn2 X+dov32ue7js9Cu2mDbtvRFqK+YAqLlA7njkHgaNoUX/Wx1Ea5Qfx899PMMFrM/bQXUi fLNKTy6etQNNU/mFiteBaUhsoGUNgzdXMBK+RUMXv55DJxYxvDx2T2onvwM7B7aUBs4N eJ53sha2xp6IMwY23/KXhcUBCV+948RYGiwIeINt3BSL6RbnfKLVO+/qajXQ/U+Rhr9B VO6A5fhH5Nw4rSFb2kwtuPr14IHiuzQGM6yJj7U5++qBdg4ynORO09EKcOACumVurYO0 NYZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=UaaGBT5FR7zP4Koxcpxav8TYx5HJ7uyuef2DUyj3ASs=; b=vfnAg4ioPopIRarZ8wN4B8vwadP4SseQW+JPlSlC4cbf2wYgpcGDePd7QpqHxjB3WL 9W1Qn66kJW/SoLNUdSK6xtxIlY+47l8vH8hd4oMAMV7eediyhuxTD0bMLoclPFEzeM/y 17eDo32pYHkaozqRpTC+RR4eCL+X8+2qO4UtQvSxihrkIiD/oUWwG/xlWqdMzTBhO3dB CkuRmVZ4pu1nSoDcCf0NWyNnRlYgln/nEuVowmVlhcE8Q8RZbs/TBZFk9Gj7LoNdC4IZ kiLyPVQgVHmizm/IeM5e249ryVGGPz8l62XoF61iHDadQ1/Z9hE++tCjT5syXvXGq5K5 iQEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hpYTRF6V; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v38-v6si5723678plg.283.2018.05.17.11.59.59; Thu, 17 May 2018 12:00:14 -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=@linaro.org header.s=google header.b=hpYTRF6V; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752075AbeEQS7p (ORCPT + 99 others); Thu, 17 May 2018 14:59:45 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:37457 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751986AbeEQS7m (ORCPT ); Thu, 17 May 2018 14:59:42 -0400 Received: by mail-ot0-f196.google.com with SMTP id 77-v6so6277549otd.4 for ; Thu, 17 May 2018 11:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UaaGBT5FR7zP4Koxcpxav8TYx5HJ7uyuef2DUyj3ASs=; b=hpYTRF6Viebd5fjWZ9vTnySpjgDvlf8QkIcX8ue83qgF8/aUEgid2Yfwj5M+7OFpPe 5REBieyDScgeExibQ7xtOVZzYC2NhoMLu3vzILiZmt2M/sCGGfDJY1MM+OoHA5dTDclZ FmEeQB5c4LhYBk8F4tH6x6DJme/Pf9YLKlvNc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UaaGBT5FR7zP4Koxcpxav8TYx5HJ7uyuef2DUyj3ASs=; b=SzLa0WqePUXnspH4lZ2U8qEEohw4ufagUCzB5rbWaciH7sI+EF59In5uFGot67ebQx CmDs2/0MKgjD0zeTPvDW/bxDqmneQrQcNfK93e8U/SXEikBxThrXEksTAN3mwkt+NGyM Yb9bVIA/Z+qu4uUiTXri7PD0u6zeH6UPx8DaGsWFC5eoHVdHlssPnsOrHWkHqC+bgQsN 8quW1sVENJuqJk9wlFmh22S8eUWcVUCh9iY/TzKsG+aU5dZ29YkFr/MKzUtr3wXGVJxr T4WolS5d6n5vBRqlhnMimzN4Ruxy6MsVmJkYlUqzVNyq8FY/+0u6HXVBH5r6OsG0GnB7 snHg== X-Gm-Message-State: ALKqPwcYpriprmokQ0JrclWSNeZociONiliRDRV2khiiQRL8k+mk88qG PyFTq5wukW9geUOr3bSBBqzEsrc9Ct/W+3my6JWQSQ== X-Received: by 2002:a9d:5134:: with SMTP id c49-v6mr4680999oth.174.1526583581148; Thu, 17 May 2018 11:59:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:14bb:0:0:0:0:0 with HTTP; Thu, 17 May 2018 11:59:40 -0700 (PDT) In-Reply-To: References: From: Benjamin Gaignard Date: Thu, 17 May 2018 20:59:40 +0200 Message-ID: Subject: Re: [PATCH v6 6/9] dt-bindings: counter: Document stm32 quadrature encoder To: Rob Herring 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >> +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: 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