From patchwork Fri Aug 27 09:49:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 137271 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o7R9oCGH022060 for ; Fri, 27 Aug 2010 09:50:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754609Ab0H0Jtq (ORCPT ); Fri, 27 Aug 2010 05:49:46 -0400 Received: from mail.renesas.com ([202.234.163.13]:58230 "EHLO mail03.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754603Ab0H0Jto (ORCPT ); Fri, 27 Aug 2010 05:49:44 -0400 X-AuditID: ac140386-0000000700003037-f0-4c778a2a780c Received: from guardian04.idc.renesas.com ([172.20.8.206]) by mail03.idc.renesas.com (sendmail) with ESMTP id o7R9nUVT002610; Fri, 27 Aug 2010 18:49:30 +0900 (JST) Received: (from root@localhost) by guardian04.idc.renesas.com with id o7R9nVbA027962; Fri, 27 Aug 2010 18:49:31 +0900 (JST) Received: from mta07.idc.renesas.com (localhost [127.0.0.1]) by mta07.idc.renesas.com with ESMTP id o7R9nUqb008668; Fri, 27 Aug 2010 18:49:30 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0L7T00DFO1YIX2@ims05.idc.renesas.com>; Fri, 27 Aug 2010 18:49:30 +0900 (JST) Date: Fri, 27 Aug 2010 18:49:30 +0900 (JST) Date-warning: Date header was inserted by ims05.idc.renesas.com From: Kuninori Morimoto Subject: [PATCH] sh: ecovec24: modify tsc2007 platform settings To: Paul Mundt Cc: Magnus , Linux-SH 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.7 (=?ISO-2022-JP-2?B?U2Fuag==?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.6 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) 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 (demeter1.kernel.org [140.211.167.41]); Fri, 27 Aug 2010 09:50:13 +0000 (UTC) diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 1d7b495..db7a7c0 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -400,32 +400,9 @@ static struct platform_device keysc_device = { /* TouchScreen */ #define IRQ0 32 -static int ts_get_pendown_state(void) -{ - int val = 0; - gpio_free(GPIO_FN_INTC_IRQ0); - gpio_request(GPIO_PTZ0, NULL); - gpio_direction_input(GPIO_PTZ0); - - val = gpio_get_value(GPIO_PTZ0); - - gpio_free(GPIO_PTZ0); - gpio_request(GPIO_FN_INTC_IRQ0, NULL); - - return val ? 0 : 1; -} - -static int ts_init(void) -{ - gpio_request(GPIO_FN_INTC_IRQ0, NULL); - return 0; -} - static struct tsc2007_platform_data tsc2007_info = { .model = 2007, - .x_plate_ohms = 180, - .get_pendown_state = ts_get_pendown_state, - .init_platform_hw = ts_init, + .x_plate_ohms = 1000, }; static struct i2c_board_info ts_i2c_clients = { @@ -1119,6 +1096,7 @@ static int __init arch_setup(void) gpio_direction_output(GPIO_PTF4, 1); /* enable TouchScreen */ + gpio_request(GPIO_FN_INTC_IRQ0, NULL); i2c_register_board_info(0, &ts_i2c_clients, 1); set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW); }