From patchwork Mon Sep 25 16:34:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 114176 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2803855qgf; Mon, 25 Sep 2017 09:34:48 -0700 (PDT) X-Received: by 10.84.235.65 with SMTP id g1mr8094213plt.353.1506357288766; Mon, 25 Sep 2017 09:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506357288; cv=none; d=google.com; s=arc-20160816; b=a6VEniQnXvTmA6HfYO3WkIStt6LTtGJAZgHGvnEmDj6w810YsBJLwt1VQ6MIYQX61O xc84UNl3D0ne96QmOB0tOzpcKw0HogDM2j/Xb9g0cQVXMEtEcUnzORvpNOzhdKF2GKbs E6ZbaXORlNxqrlsoSOtzvl1te4c+AKCUD3KTm7iK6wL/nAYKesi2w9012Wpxy1xWt06P Gmp/OCKvCdt9DVAafTTRE6qBBinP2+9dzyFOvQj9VgSA23RHjvp6WJ3OXsZafnbLh0xb 6Px3bvaD5QVRT3zwVe/9P10VtUj/leDeT9ikX385tmqLUv1INQKslr6avXPKJRZpOUuR dhtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=vZGR2zvY4vUTeVjI2FLRTHuCI6eUxh/ayppTzv0IMEg=; b=PDkfjsUIjyS6GF/Kr81LhZb6qC5nDY/OkBqRVQC00epG+BuYaQliINRg5kscy+eigK 6j2jg87QNhEnXbernTJYNbKNSEWRSbxhHp2Eu98Pi1YUFfx3HI3WbIrE9+yaPSglvWxZ GK4v7q/PKgjLEIH++VpZWEOVsgGSfzJmGxsXASikTKBjdikQQjKJzrc17OfOBNTekXRW lAQMjZG6rHyO49DHHUvnuU9o7vV/c+is5kcRrXwUP7LyTIYtYH5D02k1i75GCRmQSoDk QyUbAvfe3MO1pRtu8mmPkQByQ1d64DeWLTW4LFlx4iDOnOexVS+ZvMKxXjeppYbFxhMj p7bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=E1MRng9b; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 y11si3806375pfi.187.2017.09.25.09.34.48; Mon, 25 Sep 2017 09:34:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=E1MRng9b; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965218AbdIYQeq (ORCPT + 6 others); Mon, 25 Sep 2017 12:34:46 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:48089 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965206AbdIYQep (ORCPT ); Mon, 25 Sep 2017 12:34:45 -0400 Received: by mail-pg0-f51.google.com with SMTP id d8so4270001pgt.4 for ; Mon, 25 Sep 2017 09:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pYiyERwh1LQwPSpVBOBgHbzIS0tfpE12XQqMzbW7BWM=; b=E1MRng9bhqLrmOwX5zpKuNoPvg38UEXjlQMqDv676ks7XHCLZgDj8QAlI9Vse8JJmu 6msEvrXUo5kBkAaNrQm1ar9QjrqeRJxpgtvLwHuLJwNl3Y13+MPwjpXN3C8To5sLyhvU wNMlQNqErKjZk/cOu/1/ZCeh6lipLo+aoXlEU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pYiyERwh1LQwPSpVBOBgHbzIS0tfpE12XQqMzbW7BWM=; b=J/6+fM1BGlUeAhSgJiDY23pkXtEl+EKzV+pGRquZKG2x01Si3iadapwOVWhUrzSnLM gAyyHuZGkaC4Dy2oLR2StzlJTX/SWGaTotKN/IH2VPWxNQr6kjmN+QpTfyBaUcG4iHWZ pQYFHcjUOsUPP2pp5acQG4l3FlTmJV0IQE9wc/JTptqIBE8DAcNYqVHc8zLe+72Mhqgf DsPmajjrLvV60XaOWt7ek67Urrgc3fb/0DZgH4u8Yn7wmVxuCNEtfNYD6TxQn+Jtwul0 bqSGlNSxdWw9J0fCnKSNx5sWXHgp3xHjRU/hDfTzhoaGtQAlVI8wrCueTbH3BdEJxnZu mGhg== X-Gm-Message-State: AHPjjUjnqefLKfFadqIWvkjzfF0ffy94aq+bjp6VQZWL+UIBOEVf/KiU hUNRpZbpkysWKQrB4y+Na3FocQ== X-Google-Smtp-Source: AOwi7QAATv94IbJX275ZSGhqSanVwO6jel+CmHj3g0tw1HTTFdfckzhwgpOjJHvVjXzOXl2sPe4a5A== X-Received: by 10.99.172.2 with SMTP id v2mr8045331pge.200.1506357284462; Mon, 25 Sep 2017 09:34:44 -0700 (PDT) Received: from localhost.localdomain ([70.35.39.2]) by smtp.gmail.com with ESMTPSA id j1sm12004413pfc.169.2017.09.25.09.34.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Sep 2017 09:34:43 -0700 (PDT) From: Linus Walleij To: Dmitry Torokhov , linux-input@vger.kernel.org Cc: Hans-Christian Noren Egtvedt , Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 3/5 v2] input: mouse: Add DT bindings for GPIO mice Date: Mon, 25 Sep 2017 18:34:28 +0200 Message-Id: <20170925163430.22397-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170925163430.22397-1-linus.walleij@linaro.org> References: <20170925163430.22397-1-linus.walleij@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds DT bindings for simple mice attached to GPIO lines. As the properties are very general and pertains to all mice I can think of, we use very generic names for the 4-7 GPIO lines, "up", "down" etc. Acked-by: Hans-Christian Noren Egtvedt Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Collect Hand-Christian's ACK - Uses 5-7 lines rather than 4-7 lines - Add suffix "-ms" to the scan interval property - Fix compatible string in the example --- .../devicetree/bindings/input/gpio-mouse.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/gpio-mouse.txt -- 2.13.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Rob Herring diff --git a/Documentation/devicetree/bindings/input/gpio-mouse.txt b/Documentation/devicetree/bindings/input/gpio-mouse.txt new file mode 100644 index 000000000000..519510a11af9 --- /dev/null +++ b/Documentation/devicetree/bindings/input/gpio-mouse.txt @@ -0,0 +1,32 @@ +Device-Tree bindings for GPIO attached mice + +This simply uses standard GPIO handles to define a simple mouse connected +to 5-7 GPIO lines. + +Required properties: + - compatible: must be "gpio-mouse" + - scan-interval-ms: The scanning interval in milliseconds + - up-gpios: GPIO line phandle to the line indicating "up" + - down-gpios: GPIO line phandle to the line indicating "down" + - left-gpios: GPIO line phandle to the line indicating "left" + - right-gpios: GPIO line phandle to the line indicating "right" + +Optional properties: + - button-left-gpios: GPIO line handle to the left mouse button + - button-middle-gpios: GPIO line handle to the middle mouse button + - button-right-gpios: GPIO line handle to the right mouse button +Example: + +#include + +gpio-mouse { + compatible = "gpio-mouse"; + scan-interval-ms = <50>; + up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; +};