From patchwork Sun Sep 17 11:14:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 112836 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2564660qgf; Sun, 17 Sep 2017 04:15:07 -0700 (PDT) X-Received: by 10.84.132.111 with SMTP id 102mr32900020ple.348.1505646907200; Sun, 17 Sep 2017 04:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505646907; cv=none; d=google.com; s=arc-20160816; b=xQX/odug7MJ5AbB/093BNRxjsA2QoAdAHaPqt5D5d1sNXYL3VODOprgOXzj/rJC2sB w67HHEHqUlWWlxmM6OKuoD/UpXMo38BIhnk0cSz6RWklJAXH/FVeThVSJFVD24srxRM+ YGSMogMBwmBAXOwcqywkcAiKRCEClveo87WSkVYe/95qH0l7EIuk5u0ZZOWVRx4L7joh rfjFs1QniUx3h8Gg30tnc0ZQEh0uQZkt51kqjtwCencQhtj+LeN62aPwuf4UwKF+/mPs k2oJm1zPHsH0lTPCs1tRbEpInUy+wH8nK1xUmADiXEdD1K5vCXippkVTUhwDQ+yLNvAH X2dQ== 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=JnnIykwM/QZ0j1jnedHyutvyue7X1guPMLH7kkdNSA4=; b=X8VC4BfFHH3h6ehscmljIDxeAO33j9D2hEaTG3e+NLbIIbUOved7VhoUc5EW1WD/sR BwtEAECgplsXq0O4DY7ZZvWeNLPuPoCUCGrF7pbp6UKMfG/RfHJBePrn2QfMqfD6YwSC jDi9SLFS0tfJ86AioHhHm6ePUf2eAE9HGNzS5a8OHRcHn2gMJbZSStrVpRvnK6Uakcg5 23jNOsQIqoRXaZX94d78dDku4cWSJNJs5PRi9cSv9XytjC54Hbl/p5rO1q7rTwKFX7bk 2LPyKTn5cMh1WuQb9CmUnfG3+2hJNLtRIfhUA7zjUp02xnyHvk8Sr3XXBkPG69qyu91i 5NVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KI5esYYi; 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 k195si3206825pgc.507.2017.09.17.04.15.06; Sun, 17 Sep 2017 04:15:07 -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=KI5esYYi; 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 S1750861AbdIQLPF (ORCPT + 6 others); Sun, 17 Sep 2017 07:15:05 -0400 Received: from mail-lf0-f49.google.com ([209.85.215.49]:51653 "EHLO mail-lf0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbdIQLPF (ORCPT ); Sun, 17 Sep 2017 07:15:05 -0400 Received: by mail-lf0-f49.google.com with SMTP id y187so5695556lfc.8 for ; Sun, 17 Sep 2017 04:15:04 -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=KILbrrreLSuWUs8BJsk5IiaG68+EzsH09yOdZGDXDYA=; b=KI5esYYidEzMmlwwZiKFFVrOG9UaUQzuI8BMNxRQoyT/Mef0MpoNAtIVfMzgByhPd4 Msc8MIi8jCKJqy4OKPQAfhDWwLB4LoZ7vl+kHl+n61AmSOSZEdPxmVnuVWCs3ysrYqCJ QOoheyM050vQDwpdeVipM+RInIJAJMQVz8UrA= 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=KILbrrreLSuWUs8BJsk5IiaG68+EzsH09yOdZGDXDYA=; b=EnHlzJ7+dOn6xyUWVl7kW6F7jzMcs0Lb2W08tuXniYB4soAKQMuu7XpJHgQAk6/N73 OLxF+stt5Pl8+fy3Y+48F9Lr723uBBgMIS//9teJvsCdd/SfAGs7+pFB0M5MaCPJWcty pdBy70leqazR8u5lh1sOSUTTFJiMxt2NQ37O/Pozty27JNMfS59ZvbWr/eHsZJL+uZiD TufxPChQ0wMrN+M40OLjDQCvmC1lE5wHy1PxRwVzX4mVUYfZOMix0kN8M0aUMMD6M3sQ hOHLZC1oc6CUJBDVAbzqPCMaEo65uwhcvhjNDVzAfHAv+oESjH7FHdHlSJgma5E0GYrT 5d0A== X-Gm-Message-State: AHPjjUghS9h0Y5WHFRUNNJjX64kxlRAMl6vRywHz0gbu0PjG1vieOLTl CyFnCclSK7HsIol3 X-Google-Smtp-Source: AOwi7QC2dAP0Am8C6Zy2C5GJnlbVkuSKQx96pit8vttbTjUrz4nHdO2owQ7xHv4mB1qGP86fqrae8Q== X-Received: by 10.46.33.202 with SMTP id h71mr11695205lji.56.1505646903680; Sun, 17 Sep 2017 04:15:03 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-2209e055.014-348-6c756e10.cust.bredbandsbolaget.se. [85.224.9.34]) by smtp.gmail.com with ESMTPSA id h83sm1007069lfi.16.2017.09.17.04.15.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 17 Sep 2017 04:15:02 -0700 (PDT) From: Linus Walleij To: Dmitry Torokhov , linux-input@vger.kernel.org, Hans-Christian Noren Egtvedt Cc: Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 3/5] input: mouse: Add DT bindings for GPIO mice Date: Sun, 17 Sep 2017 13:14:43 +0200 Message-Id: <20170917111445.30880-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170917111445.30880-1-linus.walleij@linaro.org> References: <20170917111445.30880-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. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- This patch is inspired by the existance of a GPIO mouse driver with no in-kernel users. --- .../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 diff --git a/Documentation/devicetree/bindings/input/gpio-mouse.txt b/Documentation/devicetree/bindings/input/gpio-mouse.txt new file mode 100644 index 000000000000..82622a439745 --- /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 4-7 GPIO lines. + +Required properties: + - compatible: must be "gpio-mouse" + - scan-interval: 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-keys"; + scan-interval = <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>; +};