From patchwork Thu Aug 7 00:48:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 377698 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A768C140087 for ; Thu, 7 Aug 2014 10:49:23 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754258AbaHGAso (ORCPT ); Wed, 6 Aug 2014 20:48:44 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:35157 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753927AbaHGAsn (ORCPT ); Wed, 6 Aug 2014 20:48:43 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id DD778602FC4 From: Javier Martinez Canillas To: Dmitry Torokhov Cc: Nick Dyer , Stephen Warren , Yufeng Shen , Benson Leung , Doug Anderson , Olof Johansson , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Martinez Canillas Subject: [PATCH 2/2] Input: atmel_mxt_ts - Add keycodes array example Date: Thu, 7 Aug 2014 02:48:06 +0200 Message-Id: <1407372486-25881-2-git-send-email-javier.martinez@collabora.co.uk> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1407372486-25881-1-git-send-email-javier.martinez@collabora.co.uk> References: <1407372486-25881-1-git-send-email-javier.martinez@collabora.co.uk> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Atmel maXTouch driver allows to dynamically define the event keycodes set that the device is capable of. This may not be evident when reading the DT binding document so add an example to make it easier to understand how this works. Also, the current documentation says that the array limit is four entries but the driver dynamically allocates the keymap array and does not limit the array size. Signed-off-by: Javier Martinez Canillas --- Documentation/devicetree/bindings/input/atmel,maxtouch.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt index baef432..be50476 100644 --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt @@ -11,7 +11,7 @@ Required properties: Optional properties for main touchpad device: -- linux,gpio-keymap: An array of up to 4 entries indicating the Linux +- linux,gpio-keymap: An array of entries indicating the Linux keycode generated by each GPIO. Linux keycodes are defined in . @@ -22,4 +22,10 @@ Example: reg = <0x4b>; interrupt-parent = <&gpio>; interrupts = ; + linux,gpio-keymap = < BTN_LEFT + BTN_TOOL_FINGER + BTN_TOOL_DOUBLETAP + BTN_TOOL_TRIPLETAP + BTN_TOOL_QUADTAP + BTN_TOOL_QUINTTAP >; };