From patchwork Tue Aug 26 15:28:55 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: 4783041 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E420E9F2A9 for ; Tue, 26 Aug 2014 15:29:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EBEAB2011D for ; Tue, 26 Aug 2014 15:29:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA72820117 for ; Tue, 26 Aug 2014 15:29:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758583AbaHZP3i (ORCPT ); Tue, 26 Aug 2014 11:29:38 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:46947 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755879AbaHZP3g (ORCPT ); Tue, 26 Aug 2014 11:29:36 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id 5ABF26032C0 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 v2 1/3] ARM: dts: Add Peach Pit dts entry for Atmel touchpad Date: Tue, 26 Aug 2014 17:28:55 +0200 Message-Id: <1409066937-3574-2-git-send-email-javier.martinez@collabora.co.uk> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1409066937-3574-1-git-send-email-javier.martinez@collabora.co.uk> References: <1409066937-3574-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=ham 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 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 Farber. --- 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 228a6b1..e4f82d5 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>; @@ -249,6 +273,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>;