From patchwork Wed Aug 27 14:24:45 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: 4788611 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DFF1AC0338 for ; Wed, 27 Aug 2014 14:26:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4EFDF20158 for ; Wed, 27 Aug 2014 14:26:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF1132017E for ; Wed, 27 Aug 2014 14:26:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934936AbaH0OZK (ORCPT ); Wed, 27 Aug 2014 10:25:10 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:47622 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934614AbaH0OZJ (ORCPT ); Wed, 27 Aug 2014 10:25:09 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id AA35860344F From: Javier Martinez Canillas To: Kukjin Kim Cc: Doug Anderson , Olof Johansson , afaerber@suse.de, Nick Dyer , Yufeng Shen , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sjoerd Simons , Javier Martinez Canillas Subject: [PATCH v3 1/3] ARM: dts: Add Peach Pit dts entry for Atmel touchpad Date: Wed, 27 Aug 2014 16:24:45 +0200 Message-Id: <1409149487-23582-2-git-send-email-javier.martinez@collabora.co.uk> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1409149487-23582-1-git-send-email-javier.martinez@collabora.co.uk> References: <1409149487-23582-1-git-send-email-javier.martinez@collabora.co.uk> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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: Sjoerd Simons The Peach Pit board has an Atmel maXTouch trackpad device. Add the needed Device Tree nodes to support it. This Device Tree change is based on the Chrome OS 3.8 tree but adapted to use the mainline Atmel maXTouch DT binding. Signed-off-by: Sjoerd Simons [javier.martinez: added linux,gpio-keymap property and changed IRQ type] Signed-off-by: Javier Martinez Canillas --- Changes since v2: - Add spaces around '=' on properties. Suggested by Andreas Faerber. Changes since v1: - Change trackpad IRQ pad function from 0x0 (GPIO input) to 0xf (GPIO IRQ). suggested by Tomasz Figa. - Remove BTN_TOOL_* from "linux,gpio-keymap" property since those are set by input mt core if INPUT_MT_POINTER is set. Suggested by Nick Dyer. - Use correct values for "linux,gpio-keymap" property. Suggested by Nick Dyer. - Remove support for Peach Pi board since it uses a different Atmel touchpad that requires an Atmel object protocol (T100) not supported by the driver. - Use IRQ type constants from instead of magic numbers. Suggested by Andreas Faerber. --- arch/arm/boot/dts/exynos5420-peach-pit.dts | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index ab06148..a3358fc 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -11,6 +11,7 @@ /dts-v1/; #include #include +#include #include "exynos5420.dtsi" / { @@ -157,6 +158,29 @@ }; }; +&hsi2c_8 { + status = "okay"; + clock-frequency = <333000>; + + trackpad@4b { + compatible = "atmel,maxtouch"; + reg = <0x4b>; + interrupt-parent = <&gpx1>; + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + wakeup-source; + pinctrl-names = "default"; + pinctrl-0 = <&trackpad_irq>; + linux,gpio-keymap = < KEY_RESERVED + KEY_RESERVED + 0 /* GPIO 0 */ + 0 /* GPIO 1 */ + 0 /* GPIO 2 */ + BTN_LEFT /* GPIO 3 */ + KEY_RESERVED + KEY_RESERVED >; + }; +}; + &hsi2c_9 { status = "okay"; clock-frequency = <400000>; @@ -241,6 +265,13 @@ samsung,pin-drv = <0>; }; + trackpad_irq: trackpad-irq { + samsung,pins = "gpx1-1"; + samsung,pin-function = <0xf>; + samsung,pin-pud = <0>; + samsung,pin-drv = <0>; + }; + power_key_irq: power-key-irq { samsung,pins = "gpx1-2"; samsung,pin-function = <0>;