Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3440336ybb; Mon, 6 Apr 2020 08:59:32 -0700 (PDT) X-Google-Smtp-Source: APiQypI51nAJKBtmAx4aeA5b3Iie5m2aeIH8ku9PzhOSGeGPSSeJCmdAKd4pnZ9AFGAV8XexSNoP X-Received: by 2002:a4a:8926:: with SMTP id f35mr17897665ooi.97.1586188771989; Mon, 06 Apr 2020 08:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586188771; cv=none; d=google.com; s=arc-20160816; b=IT+Zz1FE90kOhvzQcpwKIlNlAmmJE6w03TZ3xRacgXcdyf4cgkBoXne48a3izpRBfS EDDfMmYszH/0S2mmjEdqu1QIiemT4d32bJCj7273pIji/HKUFBlwuCJMzCom5weE1szM 5VBIBYs3Qo7z8vkvSz81oMN83yYz6wOf2CblykXp1ZIY4oE6A6SHflvFdEvlUm2J66bY JNg1zkepoWxkXlrSyYSqIUU6M/W9Ezh4Hba91eIKQ0m6Ov/fYglWiJNF6yOeZgoOhGiW BjL6YgbwrAQbJn0Fsx5O6TbeuDZMJSkhqyS9sJuFgBK+UMK3gGsxoh8+SxDtE1oxgIBX buKw== 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:date:subject:cc:to:from; bh=GH65cKit2CRHxD+5F+J3cxEv1DTiPHLr2TvTiyeDoFE=; b=o8X9auhy2bE9aa6dp2ybwxurUjerehc9HNkFCbpY2KhuYmEZuIN2G3mpzJuW2AN9T/ ihRfkTmMgqeprDtkDJpGsPDBqj7eQEPdWMszR3VRYFFAhaoi7RjjJRyeUitw4zD5Jgo8 Ql3RCpghYssz1ttftWA43n03qzdsu7xypifFdvFYSWe7SFm8jWrFBCZrO4YeZGd9UVsw wgXKLwoMKtxaJzKJdnkrG/jF7N9iet+twwH6SbtKdQdSzRdRYxsD7Rd1PWEiuOTwiNom JPFPuIKZ3dkhkThqFOfJsIhzce/29oaJNRABgJaXxuC4KSPjpKSfK+Gz/yuBIl1wd3rK UEow== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si7799831ota.32.2020.04.06.08.59.09; Mon, 06 Apr 2020 08:59:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729221AbgDFP6a (ORCPT + 99 others); Mon, 6 Apr 2020 11:58:30 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:36043 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729174AbgDFP63 (ORCPT ); Mon, 6 Apr 2020 11:58:29 -0400 Received: from localhost (unknown [78.193.40.249]) (Authenticated sender: kamel.bouhara@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id D216B20000E; Mon, 6 Apr 2020 15:58:26 +0000 (UTC) From: Kamel Bouhara To: Dmitry Torokhov , William Breathitt Gray , Rob Herring , Mark Rutland Cc: Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Kamel Bouhara Subject: [PATCH 2/3] Input: rotary-encoder-counter: add DT bindings Date: Mon, 6 Apr 2020 17:58:05 +0200 Message-Id: <20200406155806.1295169-3-kamel.bouhara@bootlin.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200406155806.1295169-1-kamel.bouhara@bootlin.com> References: <20200406155806.1295169-1-kamel.bouhara@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add dt binding for the counter variant of the rotary encoder driver. Signed-off-by: Kamel Bouhara --- .../input/rotary-encoder-counter.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/rotary-encoder-counter.yaml diff --git a/Documentation/devicetree/bindings/input/rotary-encoder-counter.yaml b/Documentation/devicetree/bindings/input/rotary-encoder-counter.yaml new file mode 100644 index 000000000000..a59f7c1faf0c --- /dev/null +++ b/Documentation/devicetree/bindings/input/rotary-encoder-counter.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/rotary-encoder-counter.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rotary Encoder Counter + +maintainers: + - Kamel Bouhara + +description: + Registers a Rotary encoder connected through a counter device. + +properties: + compatible: + const: rotary-encoder-counter + + counter: + description: Phandle for the counter device providing rotary position. + + linux-axis: + description: The input subsystem axis to map to this rotary encoder. + type: boolean + + qdec-mode: + description: | + Quadrature decoder function to set in the counter device. + 3: x1-PHA + 4: x1-PHB + 5: x2-PHA + 6: x2-PHB + 7: x4-PHA and PHB + + steps: + description: Number of steps in a full turnaround of the encoder. + Only relevant for absolute axis. Defaults to 24 which is a typical + value for such devices. + + relative-axis: + description: Register a relative axis rather than an absolute one. + type: boolean + + rollover: + description: Automatic rollover when the rotary value becomes greater + than the specified steps or smaller than 0. For absolute axis only. + type: boolean + + poll-interval: + description: Poll interval at which the position is read from the counter + device (default 500ms). + +required: + - compatible + - counter + - qdec-mode + +examples: + - | + rotary@0 { + compatible = "rotary-encoder-counter"; + + counter =<&qdec>; + qdec-mode = <7>; + relative-axis; + }; +... -- 2.25.0