Skip to content

Commit 658ad39

Browse files
Naveen KrishnaBen Dooks
authored andcommitted
Input: s3c24xx_ts - Implement generic GPIO configuration callback
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> Acked-by: Dmitry Torokhov <dtor@mail.ru>
1 parent 2b6c02a commit 658ad39

1 file changed

Lines changed: 3 additions & 20 deletions

File tree

‎drivers/input/touchscreen/s3c2410_ts.c‎

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
#include <plat/regs-adc.h>
4040
#include <plat/ts.h>
4141

42-
#include <mach/regs-gpio.h>
43-
4442
#define TSC_SLEEP (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
4543

4644
#define INT_DOWN (0)
@@ -87,21 +85,6 @@ struct s3c2410ts {
8785

8886
static struct s3c2410ts ts;
8987

90-
/**
91-
* s3c2410_ts_connect - configure gpio for s3c2410 systems
92-
*
93-
* Configure the GPIO for the S3C2410 system, where we have external FETs
94-
* connected to the device (later systems such as the S3C2440 integrate
95-
* these into the device).
96-
*/
97-
static inline void s3c2410_ts_connect(void)
98-
{
99-
s3c2410_gpio_cfgpin(S3C2410_GPG(12), S3C2410_GPG12_XMON);
100-
s3c2410_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPG13_nXPON);
101-
s3c2410_gpio_cfgpin(S3C2410_GPG(14), S3C2410_GPG14_YMON);
102-
s3c2410_gpio_cfgpin(S3C2410_GPG(15), S3C2410_GPG15_nYPON);
103-
}
104-
10588
/**
10689
* get_down - return the down state of the pen
10790
* @data0: The data read from ADCDAT0 register.
@@ -296,9 +279,9 @@ static int __devinit s3c2410ts_probe(struct platform_device *pdev)
296279
goto err_clk;
297280
}
298281

299-
/* Configure the touchscreen external FETs on the S3C2410 */
300-
if (!platform_get_device_id(pdev)->driver_data)
301-
s3c2410_ts_connect();
282+
/* inititalise the gpio */
283+
if (info->cfg_gpio)
284+
info->cfg_gpio(to_platform_device(ts.dev));
302285

303286
ts.client = s3c_adc_register(pdev, s3c24xx_ts_select,
304287
s3c24xx_ts_conversion, 1);

0 commit comments

Comments
 (0)