From patchwork Thu Mar 11 10:42:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 84854 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2BAgQrp015414 for ; Thu, 11 Mar 2010 10:42:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756734Ab0CKKm4 (ORCPT ); Thu, 11 Mar 2010 05:42:56 -0500 Received: from mail.renesas.com ([202.234.163.13]:45923 "EHLO mail01.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756670Ab0CKKmz (ORCPT ); Thu, 11 Mar 2010 05:42:55 -0500 X-AuditID: ac140384-0000000b000004f6-02-4b98c92c3d94 Received: from guardian04.idc.renesas.com ([172.20.8.206]) by mail01.idc.renesas.com (sendmail) with ESMTP id o2BAgqE0006754; Thu, 11 Mar 2010 19:42:52 +0900 (JST) Received: (from root@localhost) by guardian04.idc.renesas.com with id o2BAgqx3027368; Thu, 11 Mar 2010 19:42:52 +0900 (JST) Received: from mta02.idc.renesas.com (localhost [127.0.0.1]) by mta02.idc.renesas.com with ESMTP id o2BAgsHv016849; Thu, 11 Mar 2010 19:42:54 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KZ400GH45RGAN@ims05.idc.renesas.com>; Thu, 11 Mar 2010 19:42:52 +0900 (JST) Date: Thu, 11 Mar 2010 19:42:52 +0900 From: Kuninori Morimoto Subject: [PATCH 2/3] ARM: mach-shmobile: ap4evb: Add TouchScreen support In-reply-to: To: lethal@linux-sh.org Cc: Magnus Damm , linux-sh@vger.kernel.org Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.3 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.02-dev (RINDOU) (2009-06-17 Rev.4261) References: X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 11 Mar 2010 10:42:56 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 1c2ec96..b104314 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include #include @@ -234,6 +236,23 @@ static struct platform_device *ap4evb_devices[] __initdata = { &sdhi0_device, }; +/* TouchScreen */ +#define IRQ28 396 +struct tsc2007_platform_data tsc2007_info = { + .model = 2007, + .x_plate_ohms = 180, +}; + +/* I2C */ +static struct i2c_board_info i2c1_devices[] = { + { + I2C_BOARD_INFO("tsc2007", 0x48), + .type = "tsc2007", + .platform_data = &tsc2007_info, + .irq = IRQ28, + }, +}; + static struct map_desc ap4evb_io_desc[] __initdata = { /* create a 1:1 entity map for 0xe6xxxxxx * used by CPGA, INTC and PFC. @@ -318,6 +337,13 @@ static void __init ap4evb_init(void) gpio_request(GPIO_FN_SDHID0_1, NULL); gpio_request(GPIO_FN_SDHID0_0, NULL); + /* enable TouchScreen */ + gpio_request(GPIO_FN_IRQ28_123, NULL); + set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW); + + i2c_register_board_info(1, i2c1_devices, + ARRAY_SIZE(i2c1_devices)); + sh7372_add_standard_devices(); platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));