From patchwork Wed May 19 06:12:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 100783 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 o4J6CYP1004139 for ; Wed, 19 May 2010 06:12:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752460Ab0ESGMl (ORCPT ); Wed, 19 May 2010 02:12:41 -0400 Received: from trinity.fluff.org ([89.16.178.74]:57050 "EHLO trinity.fluff.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752018Ab0ESGMk (ORCPT ); Wed, 19 May 2010 02:12:40 -0400 Received: from ben by trinity.fluff.org with local (Exim 4.69) (envelope-from ) id 1OEcVz-0007WU-Ap; Wed, 19 May 2010 07:12:23 +0100 From: Ben Dooks To: linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org Cc: kgene.kim@samsung.com, ch.naveen@samsubng.com, dmitry.torokhov@gmail.com, Naveen Krishna , Ben Dooks Subject: [PATCH 5/8] Input: s3c24xx_ts - Implement generic GPIO configuration callback Date: Wed, 19 May 2010 07:12:19 +0100 Message-Id: <1274249542-28795-6-git-send-email-ben-linux@fluff.org> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1274249542-28795-1-git-send-email-ben-linux@fluff.org> References: <1274249542-28795-1-git-send-email-ben-linux@fluff.org> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ben@trinity.fluff.org X-SA-Exim-Scanned: No (on trinity.fluff.org); SAEximRunCond expanded to false Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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]); Wed, 19 May 2010 06:12:41 +0000 (UTC) diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index a2e1228..86086a4 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c @@ -39,8 +39,6 @@ #include #include -#include - #define TSC_SLEEP (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0)) #define INT_DOWN (0) @@ -88,21 +86,6 @@ struct s3c2410ts { static struct s3c2410ts ts; /** - * s3c2410_ts_connect - configure gpio for s3c2410 systems - * - * Configure the GPIO for the S3C2410 system, where we have external FETs - * connected to the device (later systems such as the S3C2440 integrate - * these into the device). -*/ -static inline void s3c2410_ts_connect(void) -{ - s3c2410_gpio_cfgpin(S3C2410_GPG(12), S3C2410_GPG12_XMON); - s3c2410_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPG13_nXPON); - s3c2410_gpio_cfgpin(S3C2410_GPG(14), S3C2410_GPG14_YMON); - s3c2410_gpio_cfgpin(S3C2410_GPG(15), S3C2410_GPG15_nYPON); -} - -/** * get_down - return the down state of the pen * @data0: The data read from ADCDAT0 register. * @data1: The data read from ADCDAT1 register. @@ -296,9 +279,9 @@ static int __devinit s3c2410ts_probe(struct platform_device *pdev) goto err_clk; } - /* Configure the touchscreen external FETs on the S3C2410 */ - if (!platform_get_device_id(pdev)->driver_data) - s3c2410_ts_connect(); + /* inititalise the gpio */ + if (info->cfg_gpio) + info->cfg_gpio(to_platform_device(ts.dev)); ts.client = s3c_adc_register(pdev, s3c24xx_ts_select, s3c24xx_ts_conversion, 1);