All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
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 <ch.naveen@samsung.com>,
	Ben Dooks <ben-linux@fluff.org>
Subject: [PATCH 5/8] Input: s3c24xx_ts - Implement generic GPIO configuration callback
Date: Wed, 19 May 2010 07:12:19 +0100	[thread overview]
Message-ID: <1274249542-28795-6-git-send-email-ben-linux@fluff.org> (raw)
In-Reply-To: <1274249542-28795-1-git-send-email-ben-linux@fluff.org>

From: Naveen Krishna <ch.naveen@samsung.com>

This patch implements generic GPIO configuration function in Samsung
touchscreen driver. And makes the touchscreen driver s3c24xx-ts.c
generic to all the Samsung SoCs.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[ben-linux@fluff.org: fixed title ]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
 drivers/input/touchscreen/s3c2410_ts.c |   23 +++--------------------
 1 files changed, 3 insertions(+), 20 deletions(-)

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 <plat/regs-adc.h>
 #include <plat/ts.h>
 
-#include <mach/regs-gpio.h>
-
 #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);
-- 
1.6.3.3


WARNING: multiple messages have this Message-ID (diff)
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/8] Input: s3c24xx_ts - Implement generic GPIO configuration callback
Date: Wed, 19 May 2010 07:12:19 +0100	[thread overview]
Message-ID: <1274249542-28795-6-git-send-email-ben-linux@fluff.org> (raw)
In-Reply-To: <1274249542-28795-1-git-send-email-ben-linux@fluff.org>

From: Naveen Krishna <ch.naveen@samsung.com>

This patch implements generic GPIO configuration function in Samsung
touchscreen driver. And makes the touchscreen driver s3c24xx-ts.c
generic to all the Samsung SoCs.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[ben-linux at fluff.org: fixed title ]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
 drivers/input/touchscreen/s3c2410_ts.c |   23 +++--------------------
 1 files changed, 3 insertions(+), 20 deletions(-)

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 <plat/regs-adc.h>
 #include <plat/ts.h>
 
-#include <mach/regs-gpio.h>
-
 #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);
-- 
1.6.3.3

  parent reply	other threads:[~2010-05-19  6:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19  6:12 Samsung touchscreen updates Ben Dooks
2010-05-19  6:12 ` Ben Dooks
2010-05-19  6:12 ` [PATCH 1/8] ARM: SAMSUNG: Move mach/ts.h to plat/ts.h Ben Dooks
2010-05-19  6:12   ` Ben Dooks
2010-05-19  6:12 ` [PATCH 2/8] ARM: S3C64XX: Add touchscreen platform device definition Ben Dooks
2010-05-19  6:12   ` Ben Dooks
2010-05-19  6:12 ` [PATCH 3/8] ARM: SAMSUNG: Implements cfg_gpio function for Samsung touchscreen Ben Dooks
2010-05-19  6:12   ` Ben Dooks
2010-05-19  6:12 ` [PATCH 4/8] ARM: SAMSUNG: Move s3c64xx dev-ts.c to plat-samsung and rename configuration Ben Dooks
2010-05-19  6:12   ` Ben Dooks
2010-05-19  6:12 ` Ben Dooks [this message]
2010-05-19  6:12   ` [PATCH 5/8] Input: s3c24xx_ts - Implement generic GPIO configuration callback Ben Dooks
2010-05-19  6:12 ` [PATCH 6/8] Input: s3c24xx_ts - Add FEAT for Samsung touchscreen support Ben Dooks
2010-05-19  6:12   ` Ben Dooks
2010-05-26 21:41   ` Vasily Khoruzhick
2010-05-26 21:41     ` Vasily Khoruzhick
2010-05-19  6:12 ` [PATCH 7/8] Input: s3c24xx_ts - depend on SAMSUNG_DEV_TS and update menu entry Ben Dooks
2010-05-19  6:12   ` Ben Dooks
2010-05-19  6:12 ` [PATCH 8/8] Input: s3c24xx_ts - fix selection of S3C_ADC Ben Dooks
2010-05-19  6:12   ` Ben Dooks
2010-05-19  6:34 ` Samsung touchscreen updates Dmitry Torokhov
2010-05-19  6:34   ` Dmitry Torokhov
2010-05-19  6:41   ` Ben Dooks
2010-05-19  6:41     ` Ben Dooks
2010-05-20  7:15     ` Dmitry Torokhov
2010-05-20  7:15       ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274249542-28795-6-git-send-email-ben-linux@fluff.org \
    --to=ben-linux@fluff.org \
    --cc=ch.naveen@samsubng.com \
    --cc=ch.naveen@samsung.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.