From patchwork Tue Sep 15 14:05:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yassinjaffer@gmail.com X-Patchwork-Id: 7185421 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C4D109F380 for ; Tue, 15 Sep 2015 14:07:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62E9B20690 for ; Tue, 15 Sep 2015 14:07:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E0A4206E5 for ; Tue, 15 Sep 2015 14:07:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752762AbbIOOHI (ORCPT ); Tue, 15 Sep 2015 10:07:08 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35381 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752694AbbIOOHG (ORCPT ); Tue, 15 Sep 2015 10:07:06 -0400 Received: by pacfv12 with SMTP id fv12so181448672pac.2; Tue, 15 Sep 2015 07:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nSp3AudtZ0Ry0mqNiW1qJe45iadQSPd7N3O8bL494eY=; b=b18ZIAQaXUUKsA6BwhI2mhAtmExo5USDhKjuv8vgh4XdMTT2Wx2IfdCiyWbHRlehFM at1OaPNYxngFsOsZ11Rj13pdMuJn8Z3iUpUWsDaOjZGT1vOWF+kHyQ2/nGlNjFU7eXLm 4XiwWMnsIGpTAxR13pWDLZuHACqKQ+VFbRkG+0E5uodkCx13ZJmsAlHaPUW6mTXcgk/x Tp7tOMn/RTWclsxkF6zD6vZftH7F1jrWnRWzoW9D/HwDjuEJCoZVLkpuvgW4JbD/r5od cZ8bjIxqWiCcdButgFG0hcY3IMzjK1hQS+PSmLVYdLEe1K2aS3LG3BxzlOJs1rv6ROEb vEpQ== X-Received: by 10.68.69.70 with SMTP id c6mr48070853pbu.28.1442326026223; Tue, 15 Sep 2015 07:07:06 -0700 (PDT) Received: from localhost.localdomain (203-206-184-173.perm.iinet.net.au. [203.206.184.173]) by smtp.gmail.com with ESMTPSA id xm9sm22401469pbc.32.2015.09.15.07.07.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Sep 2015 07:07:05 -0700 (PDT) From: yassinjaffer@gmail.com To: linux-sunxi@googlegroups.com Cc: maxime.ripard@free-electrons.com, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yassin Jaffer Subject: [PATCH 4/4] devicetree: bindings:Allwinner sun4i keypad Date: Wed, 16 Sep 2015 00:05:57 +1000 Message-Id: <1442325957-10102-5-git-send-email-yassinjaffer@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442325957-10102-1-git-send-email-yassinjaffer@gmail.com> References: <1442325957-10102-1-git-send-email-yassinjaffer@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yassin Jaffer Signed-off-by: Yassin Jaffer --- .../devicetree/bindings/input/sun4i-keypad.txt | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/sun4i-keypad.txt diff --git a/Documentation/devicetree/bindings/input/sun4i-keypad.txt b/Documentation/devicetree/bindings/input/sun4i-keypad.txt new file mode 100644 index 0000000..60ed0f2 --- /dev/null +++ b/Documentation/devicetree/bindings/input/sun4i-keypad.txt @@ -0,0 +1,56 @@ +Allwinner sun4i keypad +------------------------------------------------ + +Required properties: + - compatible: "allwinner,sun4i-a10-keypad" + - reg: mmio address range of the chip + - interrupts: interrupt to which the chip is connected + - clocks : shall reference keypad controller clocks. + - clock-names : keypad controller internal clock names. Shall contain : + * "apb" : APB gating clock + * "keypad" : keypad controller clock + +Required Board Specific Properties: +- pinctrl-names: The definition can be found at +pinctrl/pinctrl-bindings.txt. + +- pinctrl-0: The definition can be found at +pinctrl/pinctrl-bindings.txt. + +- linux,keymap: The definition can be found at +bindings/input/matrix-keymap.txt. + +Optional properties: + - scan-cycle: device specific scan cycle + - debounce-cycle: device specific debounce cycle + - autorepeat: If specified device will autorepeat + +Example: + +#include + + kp: kp@01c23000 { + compatible = "allwinner,sun4i-a10-keypad"; + reg = <0x01c23000 0x400>; + interrupts = ; + clocks = <&apb0_gates 10>, <&keypad_clk>; + clock-names = "apb", "keypad"; + pinctrl-names = "default"; + pinctrl-0 = <&keypad_rows>, <&keypad_cols>; + linux,keymap = <0x00000067 /* KEY_UP */ + 0x0001006c /* KEY_DOWN */ + 0x00020072 /* KEY_VOLUMEDOWN */ + 0x00030066 /* KEY_HOME */ + 0x0100006a /* KEY_RIGHT */ + 0x01010069 /* KEY_LEFT */ + 0x0102001c /* KEY_ENTER */ + 0x01030073 /* KEY_VOLUMEUP */ + 0x02000040 /* KEY_F6 */ + 0x02010042 /* KEY_F8 */ + 0x02020043 /* KEY_F9 */ + 0x02030044 /* KEY_F10 */ + 0x0300003b /* KEY_F1 */ + 0x0301003c /* KEY_F2 */ + 0x0302003d /* KEY_F3 */ + 0x03030074>; /* KEY_POWER */ + };