From patchwork Thu Aug 11 16:26:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Parsons X-Patchwork-Id: 1058052 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7BGQdhD018372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 11 Aug 2011 16:27:00 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QrY5W-0002LX-RY; Thu, 11 Aug 2011 16:26:31 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QrY5W-0002PO-C2; Thu, 11 Aug 2011 16:26:30 +0000 Received: from relay.ptn-ipout01.plus.net ([212.159.7.35]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QrY5T-0002P5-CQ for linux-arm-kernel@lists.infradead.org; Thu, 11 Aug 2011 16:26:28 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ajs8AO4BRE5UXebj/2dsb2JhbABBgh2CbZMNNY8Gd4JAcTUYE4dxq2YCh1SJLQ6GOQSYGYRohnw Received: from outmx01.plus.net ([84.93.230.227]) by relay.ptn-ipout01.plus.net with ESMTP; 11 Aug 2011 17:26:24 +0100 Received: from [87.114.169.218] (helo=paul) by outmx01.plus.net with esmtp (Exim) id 1QrY5P-0000yE-H1; Thu, 11 Aug 2011 17:26:23 +0100 Subject: [PATCH v2 1/2] pxa/hx4700: Add Synaptics NavPoint (PXA27x SSP/SPI) driver From: "Paul Parsons" To: Date: Thu, 11 Aug 2011 16:26:21 +0000 Mime-Version: 1.0 X-Mailer: email v2.5.0 (Linux 2.6.39 x86_64 [http://email.cleancode.org]) Message-Id: X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110811_122627_729888_63836F68 X-CRM114-Status: GOOD ( 16.30 ) X-Spam-Score: 1.5 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lost.distance[at]yahoo.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 1.0 FORGED_YAHOO_RCVD 'From' yahoo.com does not match 'Received' headers -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.159.7.35 listed in list.dnswl.org] 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list Cc: koen@dominion.thruhere.net, eric.y.miao@gmail.com, philipp.zabel@gmail.com, mad_soft@inbox.ru X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 11 Aug 2011 16:27:00 +0000 (UTC) Add support for the Synaptics NavPoint connected to a PXA27x SSP port in SPI slave mode. The driver implements a simple navigation pad. The four raised dots are mapped to UP/DOWN/LEFT/RIGHT buttons and the centre of the touchpad is mapped to the ENTER button. Signed-off-by: Paul Parsons --- V2: Split into 2 parts for hx4700 specific code and navpoint driver. Added GPIO23_SSP1_SCLK_IN and GPIO102_NAVPOINT_PWR to mfp-pxa27x.h. Replaced power on/off callback with gpio number. Added msleep() to SSP port ready loop. diff -uprN clean-3.0.1/arch/arm/mach-pxa/hx4700.c linux-3.0.1/arch/arm/mach-pxa/hx4700.c --- clean-3.0.1/arch/arm/mach-pxa/hx4700.c 2011-08-05 05:59:21.000000000 +0100 +++ linux-3.0.1/arch/arm/mach-pxa/hx4700.c 2011-08-11 16:49:42.900736676 +0100 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -111,10 +112,11 @@ static unsigned long hx4700_pin_config[] GPIO113_I2S_SYSCLK, /* SSP 1 (NavPoint) */ - GPIO23_SSP1_SCLK, + GPIO23_SSP1_SCLK_IN, GPIO24_SSP1_SFRM, GPIO25_SSP1_TXD, GPIO26_SSP1_RXD, + GPIO102_NAVPOINT_PWR, /* SSP 2 (TSC2046) */ GPIO19_SSP2_SCLK, @@ -217,6 +219,23 @@ static struct platform_device gpio_keys }; /* + * Synaptics NavPoint connected to SSP1 + */ + +static struct navpoint_platform_data navpoint_platform_data = { + .port = 1, + .gpio = GPIO102_HX4700_SYNAPTICS_POWER_ON, +}; + +static struct platform_device navpoint = { + .name = "navpoint", + .id = -1, + .dev = { + .platform_data = &navpoint_platform_data, + }, +}; + +/* * ASIC3 */ @@ -818,6 +837,7 @@ static struct platform_device pcmcia = { static struct platform_device *devices[] __initdata = { &asic3, &gpio_keys, + &navpoint, &backlight, &w3220, &hx4700_lcd,