* Samsung touchscreen updates
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input; +Cc: kgene.kim, ch.naveen, dmitry.torokhov
Dimitry, this is a set of updates for the Samsung platform support for
touchscreen devices and the drivers/input/touchscreen items for the
s3c2410_ts driver.
Since the changes have some interedependency, I would like permission
to merge this via the Samsung platform tree with your acknowledgement
for the drivers/input/touchscreen items.
The arch/arm/* portions of this patchset have been included as FYI and
to show other interested parties what is goign on.
Please let me know what you think.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Samsung touchscreen updates
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
Dimitry, this is a set of updates for the Samsung platform support for
touchscreen devices and the drivers/input/touchscreen items for the
s3c2410_ts driver.
Since the changes have some interedependency, I would like permission
to merge this via the Samsung platform tree with your acknowledgement
for the drivers/input/touchscreen items.
The arch/arm/* portions of this patchset have been included as FYI and
to show other interested parties what is goign on.
Please let me know what you think.
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/8] ARM: SAMSUNG: Move mach/ts.h to plat/ts.h
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:12 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input
Cc: kgene.kim, ch.naveen, dmitry.torokhov, Maurus Cuelenaere, Ben Dooks
From: Maurus Cuelenaere <mcuelenaere@gmail.com>
This moves mach-s3c2410/include/mach/ts.h to plat-samsung/include/plat/ts.h in
order to prepare for s3c64xx support in the touchscreen driver.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mach-s3c2410/include/mach/ts.h | 21 ---------------------
arch/arm/mach-s3c2410/mach-h1940.c | 2 +-
arch/arm/plat-s3c24xx/devs.c | 3 +--
arch/arm/plat-samsung/include/plat/ts.h | 21 +++++++++++++++++++++
drivers/input/touchscreen/s3c2410_ts.c | 2 +-
5 files changed, 24 insertions(+), 25 deletions(-)
delete mode 100644 arch/arm/mach-s3c2410/include/mach/ts.h
create mode 100644 arch/arm/plat-samsung/include/plat/ts.h
diff --git a/arch/arm/mach-s3c2410/include/mach/ts.h b/arch/arm/mach-s3c2410/include/mach/ts.h
deleted file mode 100644
index dc36170..0000000
--- a/arch/arm/mach-s3c2410/include/mach/ts.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* linux/include/asm/arch-s3c2410/ts.h
- *
- * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARM_TS_H
-#define __ASM_ARM_TS_H
-
-struct s3c2410_ts_mach_info {
- int delay;
- int presc;
- int oversampling_shift;
-};
-
-extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *);
-
-#endif /* __ASM_ARM_TS_H */
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index d2a2fad..b1f7dbb 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -46,7 +46,6 @@
#include <mach/h1940.h>
#include <mach/h1940-latch.h>
#include <mach/fb.h>
-#include <mach/ts.h>
#include <plat/udc.h>
#include <plat/iic.h>
@@ -57,6 +56,7 @@
#include <plat/pll.h>
#include <plat/pm.h>
#include <plat/mci.h>
+#include <plat/ts.h>
static struct map_desc h1940_iodesc[] __initdata = {
[0] = {
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index cd5b41d..5858373 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -39,8 +39,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/regs-spi.h>
-
-#include <mach/ts.h>
+#include <plat/ts.h>
/* Serial port registrations */
diff --git a/arch/arm/plat-samsung/include/plat/ts.h b/arch/arm/plat-samsung/include/plat/ts.h
new file mode 100644
index 0000000..8a51675
--- /dev/null
+++ b/arch/arm/plat-samsung/include/plat/ts.h
@@ -0,0 +1,21 @@
+/* arch/arm/plat-samsung/include/plat/ts.h
+ *
+ * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef __ASM_ARM_TS_H
+#define __ASM_ARM_TS_H
+
+struct s3c2410_ts_mach_info {
+ int delay;
+ int presc;
+ int oversampling_shift;
+};
+
+extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *);
+
+#endif /* __ASM_ARM_TS_H */
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 98a7d12..a2e1228 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -37,9 +37,9 @@
#include <plat/adc.h>
#include <plat/regs-adc.h>
+#include <plat/ts.h>
#include <mach/regs-gpio.h>
-#include <mach/ts.h>
#define TSC_SLEEP (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/8] ARM: SAMSUNG: Move mach/ts.h to plat/ts.h
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Maurus Cuelenaere <mcuelenaere@gmail.com>
This moves mach-s3c2410/include/mach/ts.h to plat-samsung/include/plat/ts.h in
order to prepare for s3c64xx support in the touchscreen driver.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mach-s3c2410/include/mach/ts.h | 21 ---------------------
arch/arm/mach-s3c2410/mach-h1940.c | 2 +-
arch/arm/plat-s3c24xx/devs.c | 3 +--
arch/arm/plat-samsung/include/plat/ts.h | 21 +++++++++++++++++++++
drivers/input/touchscreen/s3c2410_ts.c | 2 +-
5 files changed, 24 insertions(+), 25 deletions(-)
delete mode 100644 arch/arm/mach-s3c2410/include/mach/ts.h
create mode 100644 arch/arm/plat-samsung/include/plat/ts.h
diff --git a/arch/arm/mach-s3c2410/include/mach/ts.h b/arch/arm/mach-s3c2410/include/mach/ts.h
deleted file mode 100644
index dc36170..0000000
--- a/arch/arm/mach-s3c2410/include/mach/ts.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* linux/include/asm/arch-s3c2410/ts.h
- *
- * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARM_TS_H
-#define __ASM_ARM_TS_H
-
-struct s3c2410_ts_mach_info {
- int delay;
- int presc;
- int oversampling_shift;
-};
-
-extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *);
-
-#endif /* __ASM_ARM_TS_H */
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index d2a2fad..b1f7dbb 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -46,7 +46,6 @@
#include <mach/h1940.h>
#include <mach/h1940-latch.h>
#include <mach/fb.h>
-#include <mach/ts.h>
#include <plat/udc.h>
#include <plat/iic.h>
@@ -57,6 +56,7 @@
#include <plat/pll.h>
#include <plat/pm.h>
#include <plat/mci.h>
+#include <plat/ts.h>
static struct map_desc h1940_iodesc[] __initdata = {
[0] = {
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index cd5b41d..5858373 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -39,8 +39,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/regs-spi.h>
-
-#include <mach/ts.h>
+#include <plat/ts.h>
/* Serial port registrations */
diff --git a/arch/arm/plat-samsung/include/plat/ts.h b/arch/arm/plat-samsung/include/plat/ts.h
new file mode 100644
index 0000000..8a51675
--- /dev/null
+++ b/arch/arm/plat-samsung/include/plat/ts.h
@@ -0,0 +1,21 @@
+/* arch/arm/plat-samsung/include/plat/ts.h
+ *
+ * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef __ASM_ARM_TS_H
+#define __ASM_ARM_TS_H
+
+struct s3c2410_ts_mach_info {
+ int delay;
+ int presc;
+ int oversampling_shift;
+};
+
+extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *);
+
+#endif /* __ASM_ARM_TS_H */
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 98a7d12..a2e1228 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -37,9 +37,9 @@
#include <plat/adc.h>
#include <plat/regs-adc.h>
+#include <plat/ts.h>
#include <mach/regs-gpio.h>
-#include <mach/ts.h>
#define TSC_SLEEP (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/8] ARM: S3C64XX: Add touchscreen platform device definition
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:12 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input
Cc: kgene.kim, ch.naveen, dmitry.torokhov, Maurus Cuelenaere, Ben Dooks
From: Maurus Cuelenaere <mcuelenaere@gmail.com>
This patch adds the touchscreen platform device definition for S3C64XX boards.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mach-s3c64xx/Makefile | 1 +
arch/arm/mach-s3c64xx/dev-ts.c | 61 ++++++++++++++++++++++++++++++++++++++++
arch/arm/plat-samsung/Kconfig | 6 ++++
3 files changed, 68 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-s3c64xx/dev-ts.c
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index d78c3dd..a10f1fc 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -58,3 +58,4 @@ obj-$(CONFIG_MACH_HMT) += mach-hmt.o
obj-y += dev-uart.o
obj-y += dev-audio.o
obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o
+obj-$(CONFIG_S3C64XX_DEV_TS) += dev-ts.o
diff --git a/arch/arm/mach-s3c64xx/dev-ts.c b/arch/arm/mach-s3c64xx/dev-ts.c
new file mode 100644
index 0000000..17cc793
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/dev-ts.c
@@ -0,0 +1,61 @@
+/* linux/arch/arm/mach-s3c64xx/dev-ts.c
+ *
+ * Copyright (c) 2008 Simtec Electronics
+ * http://armlinux.simtec.co.uk/
+ * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
+ *
+ * Adapted by Maurus Cuelenaere for s3c64xx
+ *
+ * S3C64XX series device definition for touchscreen device
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/devs.h>
+#include <plat/ts.h>
+
+static struct resource s3c_ts_resource[] = {
+ [0] = {
+ .start = S3C64XX_PA_ADC,
+ .end = S3C64XX_PA_ADC + SZ_256 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_TC,
+ .end = IRQ_TC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device s3c_device_ts = {
+ .name = "s3c64xx-ts",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(s3c_ts_resource),
+ .resource = s3c_ts_resource,
+};
+
+void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
+{
+ struct s3c2410_ts_mach_info *npd;
+
+ if (!pd) {
+ printk(KERN_ERR "%s: no platform data\n", __func__);
+ return;
+ }
+
+ npd = kmemdup(pd, sizeof(struct s3c2410_ts_mach_info), GFP_KERNEL);
+ if (!npd)
+ printk(KERN_ERR "%s: no memory for platform data\n", __func__);
+
+ s3c_device_ts.dev.platform_data = npd;
+}
+EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 64ab53c..1ea9389 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -206,6 +206,12 @@ config S3C64XX_DEV_SPI
Compile in platform device definitions for S3C64XX's type
SPI controllers.
+config S3C64XX_DEV_TS
+ bool
+ help
+ Common in platform device definitions for S3C64XX touchscreen
+ device
+
# DMA
config S3C_DMA
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/8] ARM: S3C64XX: Add touchscreen platform device definition
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Maurus Cuelenaere <mcuelenaere@gmail.com>
This patch adds the touchscreen platform device definition for S3C64XX boards.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mach-s3c64xx/Makefile | 1 +
arch/arm/mach-s3c64xx/dev-ts.c | 61 ++++++++++++++++++++++++++++++++++++++++
arch/arm/plat-samsung/Kconfig | 6 ++++
3 files changed, 68 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-s3c64xx/dev-ts.c
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index d78c3dd..a10f1fc 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -58,3 +58,4 @@ obj-$(CONFIG_MACH_HMT) += mach-hmt.o
obj-y += dev-uart.o
obj-y += dev-audio.o
obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o
+obj-$(CONFIG_S3C64XX_DEV_TS) += dev-ts.o
diff --git a/arch/arm/mach-s3c64xx/dev-ts.c b/arch/arm/mach-s3c64xx/dev-ts.c
new file mode 100644
index 0000000..17cc793
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/dev-ts.c
@@ -0,0 +1,61 @@
+/* linux/arch/arm/mach-s3c64xx/dev-ts.c
+ *
+ * Copyright (c) 2008 Simtec Electronics
+ * http://armlinux.simtec.co.uk/
+ * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
+ *
+ * Adapted by Maurus Cuelenaere for s3c64xx
+ *
+ * S3C64XX series device definition for touchscreen device
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/devs.h>
+#include <plat/ts.h>
+
+static struct resource s3c_ts_resource[] = {
+ [0] = {
+ .start = S3C64XX_PA_ADC,
+ .end = S3C64XX_PA_ADC + SZ_256 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_TC,
+ .end = IRQ_TC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device s3c_device_ts = {
+ .name = "s3c64xx-ts",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(s3c_ts_resource),
+ .resource = s3c_ts_resource,
+};
+
+void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
+{
+ struct s3c2410_ts_mach_info *npd;
+
+ if (!pd) {
+ printk(KERN_ERR "%s: no platform data\n", __func__);
+ return;
+ }
+
+ npd = kmemdup(pd, sizeof(struct s3c2410_ts_mach_info), GFP_KERNEL);
+ if (!npd)
+ printk(KERN_ERR "%s: no memory for platform data\n", __func__);
+
+ s3c_device_ts.dev.platform_data = npd;
+}
+EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 64ab53c..1ea9389 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -206,6 +206,12 @@ config S3C64XX_DEV_SPI
Compile in platform device definitions for S3C64XX's type
SPI controllers.
+config S3C64XX_DEV_TS
+ bool
+ help
+ Common in platform device definitions for S3C64XX touchscreen
+ device
+
# DMA
config S3C_DMA
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/8] ARM: SAMSUNG: Implements cfg_gpio function for Samsung touchscreen
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:12 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input
Cc: kgene.kim, ch.naveen, dmitry.torokhov, Naveen Krishna, Ben Dooks
From: Naveen Krishna <ch.naveen@samsung.com>
This patch implements cfg_gpio function for Samsung touchscreen.
And also modifies the H1940 machine respectively.
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mach-s3c2410/Kconfig | 1 +
arch/arm/mach-s3c2410/mach-h1940.c | 1 +
arch/arm/plat-s3c24xx/Kconfig | 5 ++++
arch/arm/plat-s3c24xx/Makefile | 1 +
arch/arm/plat-s3c24xx/setup-ts.c | 34 +++++++++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/ts.h | 4 +++
6 files changed, 46 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/plat-s3c24xx/setup-ts.c
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index a4c0b3f..7245a55 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -77,6 +77,7 @@ config ARCH_H1940
select PM_H1940 if PM
select S3C_DEV_USB_HOST
select S3C_DEV_NAND
+ select S3C2410_SETUP_TS
help
Say Y here if you are using the HP IPAQ H1940
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index b1f7dbb..779b45b 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -146,6 +146,7 @@ static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = {
.delay = 10000,
.presc = 49,
.oversampling_shift = 2,
+ .cfg_gpio = s3c24xx_ts_cfg_gpio,
};
/**
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
index 3ce8f01..984bf66 100644
--- a/arch/arm/plat-s3c24xx/Kconfig
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -164,4 +164,9 @@ config S3C24XX_SIMTEC_AUDIO
help
Add audio devices for common Simtec S3C24XX boards
+config S3C2410_SETUP_TS
+ bool
+ help
+ Compile in platform device definition for Samsung TouchScreen.
+
endif
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile
index 44aea88..c2064c3 100644
--- a/arch/arm/plat-s3c24xx/Makefile
+++ b/arch/arm/plat-s3c24xx/Makefile
@@ -38,6 +38,7 @@ obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += s3c2410-cpufreq-utils.o
# device specific setup and/or initialisation
obj-$(CONFIG_ARCH_S3C2410) += setup-i2c.o
+obj-$(CONFIG_S3C2410_SETUP_TS) += setup-ts.o
# SPI gpio central GPIO functions
diff --git a/arch/arm/plat-s3c24xx/setup-ts.c b/arch/arm/plat-s3c24xx/setup-ts.c
new file mode 100644
index 0000000..ed26386
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/setup-ts.c
@@ -0,0 +1,34 @@
+/* linux/arch/arm/plat-s3c24xx/setup-ts.c
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * Based on S3C24XX setup for i2c device
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/gpio.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <mach/hardware.h>
+#include <mach/regs-gpio.h>
+
+/**
+ * s3c24xx_ts_cfg_gpio - 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).
+ */
+void s3c24xx_ts_cfg_gpio(struct platform_device *dev)
+{
+ 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);
+}
diff --git a/arch/arm/plat-samsung/include/plat/ts.h b/arch/arm/plat-samsung/include/plat/ts.h
index 8a51675..26fdb22 100644
--- a/arch/arm/plat-samsung/include/plat/ts.h
+++ b/arch/arm/plat-samsung/include/plat/ts.h
@@ -14,8 +14,12 @@ struct s3c2410_ts_mach_info {
int delay;
int presc;
int oversampling_shift;
+ void (*cfg_gpio)(struct platform_device *dev);
};
extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *);
+/* defined by architecture to configure gpio */
+extern void s3c24xx_ts_cfg_gpio(struct platform_device *dev);
+
#endif /* __ASM_ARM_TS_H */
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/8] ARM: SAMSUNG: Implements cfg_gpio function for Samsung touchscreen
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Naveen Krishna <ch.naveen@samsung.com>
This patch implements cfg_gpio function for Samsung touchscreen.
And also modifies the H1940 machine respectively.
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mach-s3c2410/Kconfig | 1 +
arch/arm/mach-s3c2410/mach-h1940.c | 1 +
arch/arm/plat-s3c24xx/Kconfig | 5 ++++
arch/arm/plat-s3c24xx/Makefile | 1 +
arch/arm/plat-s3c24xx/setup-ts.c | 34 +++++++++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/ts.h | 4 +++
6 files changed, 46 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/plat-s3c24xx/setup-ts.c
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index a4c0b3f..7245a55 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -77,6 +77,7 @@ config ARCH_H1940
select PM_H1940 if PM
select S3C_DEV_USB_HOST
select S3C_DEV_NAND
+ select S3C2410_SETUP_TS
help
Say Y here if you are using the HP IPAQ H1940
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index b1f7dbb..779b45b 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -146,6 +146,7 @@ static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = {
.delay = 10000,
.presc = 49,
.oversampling_shift = 2,
+ .cfg_gpio = s3c24xx_ts_cfg_gpio,
};
/**
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
index 3ce8f01..984bf66 100644
--- a/arch/arm/plat-s3c24xx/Kconfig
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -164,4 +164,9 @@ config S3C24XX_SIMTEC_AUDIO
help
Add audio devices for common Simtec S3C24XX boards
+config S3C2410_SETUP_TS
+ bool
+ help
+ Compile in platform device definition for Samsung TouchScreen.
+
endif
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile
index 44aea88..c2064c3 100644
--- a/arch/arm/plat-s3c24xx/Makefile
+++ b/arch/arm/plat-s3c24xx/Makefile
@@ -38,6 +38,7 @@ obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += s3c2410-cpufreq-utils.o
# device specific setup and/or initialisation
obj-$(CONFIG_ARCH_S3C2410) += setup-i2c.o
+obj-$(CONFIG_S3C2410_SETUP_TS) += setup-ts.o
# SPI gpio central GPIO functions
diff --git a/arch/arm/plat-s3c24xx/setup-ts.c b/arch/arm/plat-s3c24xx/setup-ts.c
new file mode 100644
index 0000000..ed26386
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/setup-ts.c
@@ -0,0 +1,34 @@
+/* linux/arch/arm/plat-s3c24xx/setup-ts.c
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * Based on S3C24XX setup for i2c device
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/gpio.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <mach/hardware.h>
+#include <mach/regs-gpio.h>
+
+/**
+ * s3c24xx_ts_cfg_gpio - 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).
+ */
+void s3c24xx_ts_cfg_gpio(struct platform_device *dev)
+{
+ 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);
+}
diff --git a/arch/arm/plat-samsung/include/plat/ts.h b/arch/arm/plat-samsung/include/plat/ts.h
index 8a51675..26fdb22 100644
--- a/arch/arm/plat-samsung/include/plat/ts.h
+++ b/arch/arm/plat-samsung/include/plat/ts.h
@@ -14,8 +14,12 @@ struct s3c2410_ts_mach_info {
int delay;
int presc;
int oversampling_shift;
+ void (*cfg_gpio)(struct platform_device *dev);
};
extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *);
+/* defined by architecture to configure gpio */
+extern void s3c24xx_ts_cfg_gpio(struct platform_device *dev);
+
#endif /* __ASM_ARM_TS_H */
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 4/8] ARM: SAMSUNG: Move s3c64xx dev-ts.c to plat-samsung and rename configuration
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:12 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input
Cc: kgene.kim, ch.naveen, dmitry.torokhov, Ben Dooks
Move the arch/arm/mach-s3c64xx/dev-ts.c file to arch/arm/plat-samsung and
rename the Kconfig entry appropriately.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mach-s3c64xx/dev-ts.c | 61 ----------------------------------------
arch/arm/plat-samsung/Kconfig | 5 +--
arch/arm/plat-samsung/Makefile | 1 +
arch/arm/plat-samsung/dev-ts.c | 61 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 64 insertions(+), 64 deletions(-)
delete mode 100644 arch/arm/mach-s3c64xx/dev-ts.c
create mode 100644 arch/arm/plat-samsung/dev-ts.c
diff --git a/arch/arm/mach-s3c64xx/dev-ts.c b/arch/arm/mach-s3c64xx/dev-ts.c
deleted file mode 100644
index 17cc793..0000000
--- a/arch/arm/mach-s3c64xx/dev-ts.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* linux/arch/arm/mach-s3c64xx/dev-ts.c
- *
- * Copyright (c) 2008 Simtec Electronics
- * http://armlinux.simtec.co.uk/
- * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
- *
- * Adapted by Maurus Cuelenaere for s3c64xx
- *
- * S3C64XX series device definition for touchscreen device
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/platform_device.h>
-
-#include <mach/irqs.h>
-#include <mach/map.h>
-
-#include <plat/devs.h>
-#include <plat/ts.h>
-
-static struct resource s3c_ts_resource[] = {
- [0] = {
- .start = S3C64XX_PA_ADC,
- .end = S3C64XX_PA_ADC + SZ_256 - 1,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = IRQ_TC,
- .end = IRQ_TC,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-struct platform_device s3c_device_ts = {
- .name = "s3c64xx-ts",
- .id = -1,
- .num_resources = ARRAY_SIZE(s3c_ts_resource),
- .resource = s3c_ts_resource,
-};
-
-void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
-{
- struct s3c2410_ts_mach_info *npd;
-
- if (!pd) {
- printk(KERN_ERR "%s: no platform data\n", __func__);
- return;
- }
-
- npd = kmemdup(pd, sizeof(struct s3c2410_ts_mach_info), GFP_KERNEL);
- if (!npd)
- printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-
- s3c_device_ts.dev.platform_data = npd;
-}
-EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 1ea9389..726aef0 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -206,11 +206,10 @@ config S3C64XX_DEV_SPI
Compile in platform device definitions for S3C64XX's type
SPI controllers.
-config S3C64XX_DEV_TS
+config SAMSUNG_DEV_TS
bool
help
- Common in platform device definitions for S3C64XX touchscreen
- device
+ Common in platform device definitions for touchscreen device
# DMA
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 7068af3..4828849 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o
obj-$(CONFIG_S3C_DEV_RTC) += dev-rtc.o
obj-$(CONFIG_SAMSUNG_DEV_ADC) += dev-adc.o
+obj-$(CONFIG_SAMSUNG_DEV_TS) += dev-ts.o
# DMA support
diff --git a/arch/arm/plat-samsung/dev-ts.c b/arch/arm/plat-samsung/dev-ts.c
new file mode 100644
index 0000000..17cc793
--- /dev/null
+++ b/arch/arm/plat-samsung/dev-ts.c
@@ -0,0 +1,61 @@
+/* linux/arch/arm/mach-s3c64xx/dev-ts.c
+ *
+ * Copyright (c) 2008 Simtec Electronics
+ * http://armlinux.simtec.co.uk/
+ * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
+ *
+ * Adapted by Maurus Cuelenaere for s3c64xx
+ *
+ * S3C64XX series device definition for touchscreen device
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/devs.h>
+#include <plat/ts.h>
+
+static struct resource s3c_ts_resource[] = {
+ [0] = {
+ .start = S3C64XX_PA_ADC,
+ .end = S3C64XX_PA_ADC + SZ_256 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_TC,
+ .end = IRQ_TC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device s3c_device_ts = {
+ .name = "s3c64xx-ts",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(s3c_ts_resource),
+ .resource = s3c_ts_resource,
+};
+
+void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
+{
+ struct s3c2410_ts_mach_info *npd;
+
+ if (!pd) {
+ printk(KERN_ERR "%s: no platform data\n", __func__);
+ return;
+ }
+
+ npd = kmemdup(pd, sizeof(struct s3c2410_ts_mach_info), GFP_KERNEL);
+ if (!npd)
+ printk(KERN_ERR "%s: no memory for platform data\n", __func__);
+
+ s3c_device_ts.dev.platform_data = npd;
+}
+EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 4/8] ARM: SAMSUNG: Move s3c64xx dev-ts.c to plat-samsung and rename configuration
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
Move the arch/arm/mach-s3c64xx/dev-ts.c file to arch/arm/plat-samsung and
rename the Kconfig entry appropriately.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mach-s3c64xx/dev-ts.c | 61 ----------------------------------------
arch/arm/plat-samsung/Kconfig | 5 +--
arch/arm/plat-samsung/Makefile | 1 +
arch/arm/plat-samsung/dev-ts.c | 61 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 64 insertions(+), 64 deletions(-)
delete mode 100644 arch/arm/mach-s3c64xx/dev-ts.c
create mode 100644 arch/arm/plat-samsung/dev-ts.c
diff --git a/arch/arm/mach-s3c64xx/dev-ts.c b/arch/arm/mach-s3c64xx/dev-ts.c
deleted file mode 100644
index 17cc793..0000000
--- a/arch/arm/mach-s3c64xx/dev-ts.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* linux/arch/arm/mach-s3c64xx/dev-ts.c
- *
- * Copyright (c) 2008 Simtec Electronics
- * http://armlinux.simtec.co.uk/
- * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
- *
- * Adapted by Maurus Cuelenaere for s3c64xx
- *
- * S3C64XX series device definition for touchscreen device
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/platform_device.h>
-
-#include <mach/irqs.h>
-#include <mach/map.h>
-
-#include <plat/devs.h>
-#include <plat/ts.h>
-
-static struct resource s3c_ts_resource[] = {
- [0] = {
- .start = S3C64XX_PA_ADC,
- .end = S3C64XX_PA_ADC + SZ_256 - 1,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = IRQ_TC,
- .end = IRQ_TC,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-struct platform_device s3c_device_ts = {
- .name = "s3c64xx-ts",
- .id = -1,
- .num_resources = ARRAY_SIZE(s3c_ts_resource),
- .resource = s3c_ts_resource,
-};
-
-void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
-{
- struct s3c2410_ts_mach_info *npd;
-
- if (!pd) {
- printk(KERN_ERR "%s: no platform data\n", __func__);
- return;
- }
-
- npd = kmemdup(pd, sizeof(struct s3c2410_ts_mach_info), GFP_KERNEL);
- if (!npd)
- printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-
- s3c_device_ts.dev.platform_data = npd;
-}
-EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 1ea9389..726aef0 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -206,11 +206,10 @@ config S3C64XX_DEV_SPI
Compile in platform device definitions for S3C64XX's type
SPI controllers.
-config S3C64XX_DEV_TS
+config SAMSUNG_DEV_TS
bool
help
- Common in platform device definitions for S3C64XX touchscreen
- device
+ Common in platform device definitions for touchscreen device
# DMA
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 7068af3..4828849 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o
obj-$(CONFIG_S3C_DEV_RTC) += dev-rtc.o
obj-$(CONFIG_SAMSUNG_DEV_ADC) += dev-adc.o
+obj-$(CONFIG_SAMSUNG_DEV_TS) += dev-ts.o
# DMA support
diff --git a/arch/arm/plat-samsung/dev-ts.c b/arch/arm/plat-samsung/dev-ts.c
new file mode 100644
index 0000000..17cc793
--- /dev/null
+++ b/arch/arm/plat-samsung/dev-ts.c
@@ -0,0 +1,61 @@
+/* linux/arch/arm/mach-s3c64xx/dev-ts.c
+ *
+ * Copyright (c) 2008 Simtec Electronics
+ * http://armlinux.simtec.co.uk/
+ * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
+ *
+ * Adapted by Maurus Cuelenaere for s3c64xx
+ *
+ * S3C64XX series device definition for touchscreen device
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/devs.h>
+#include <plat/ts.h>
+
+static struct resource s3c_ts_resource[] = {
+ [0] = {
+ .start = S3C64XX_PA_ADC,
+ .end = S3C64XX_PA_ADC + SZ_256 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_TC,
+ .end = IRQ_TC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device s3c_device_ts = {
+ .name = "s3c64xx-ts",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(s3c_ts_resource),
+ .resource = s3c_ts_resource,
+};
+
+void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
+{
+ struct s3c2410_ts_mach_info *npd;
+
+ if (!pd) {
+ printk(KERN_ERR "%s: no platform data\n", __func__);
+ return;
+ }
+
+ npd = kmemdup(pd, sizeof(struct s3c2410_ts_mach_info), GFP_KERNEL);
+ if (!npd)
+ printk(KERN_ERR "%s: no memory for platform data\n", __func__);
+
+ s3c_device_ts.dev.platform_data = npd;
+}
+EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 5/8] Input: s3c24xx_ts - Implement generic GPIO configuration callback
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:12 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input
Cc: kgene.kim, ch.naveen, dmitry.torokhov, Naveen Krishna, Ben Dooks
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
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 5/8] Input: s3c24xx_ts - Implement generic GPIO configuration callback
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 6/8] Input: s3c24xx_ts - Add FEAT for Samsung touchscreen support
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:12 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input
Cc: kgene.kim, ch.naveen, dmitry.torokhov, Naveen Krishna, Ben Dooks
From: Naveen Krishna <ch.naveen@samsung.com>
This patch adds a feature bit field in the touchscreen driver for Samsung SoCs.
Which can be used to distinguish the TSADC module features.
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[ben-linux@fluff.org: minor fix to title]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
drivers/input/touchscreen/s3c2410_ts.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 86086a4..e0b7c83 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -55,6 +55,8 @@
S3C2410_ADCTSC_AUTO_PST | \
S3C2410_ADCTSC_XY_PST(0))
+#define FEAT_PEN_IRQ (1 << 0) /* HAS ADCCLRINTPNDNUP */
+
/* Per-touchscreen data. */
/**
@@ -69,6 +71,7 @@
* @irq_tc: The interrupt number for pen up/down interrupt
* @count: The number of samples collected.
* @shift: The log2 of the maximum count to read in one go.
+ * @features: The features supported by the TSADC MOdule.
*/
struct s3c2410ts {
struct s3c_adc_client *client;
@@ -81,6 +84,7 @@ struct s3c2410ts {
int irq_tc;
int count;
int shift;
+ int features;
};
static struct s3c2410ts ts;
@@ -171,6 +175,11 @@ static irqreturn_t stylus_irq(int irq, void *dev_id)
else
dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count);
+ if (ts.features & FEAT_PEN_IRQ) {
+ /* Clear pen down/up interrupt */
+ writel(0x0, ts.io + S3C64XX_ADCCLRINTPNDNUP);
+ }
+
return IRQ_HANDLED;
}
@@ -317,6 +326,7 @@ static int __devinit s3c2410ts_probe(struct platform_device *pdev)
ts.input->id.version = 0x0102;
ts.shift = info->oversampling_shift;
+ ts.features = platform_get_device_id(pdev)->driver_data;
ret = request_irq(ts.irq_tc, stylus_irq, IRQF_DISABLED,
"s3c2410_ts_pen", ts.input);
@@ -403,15 +413,14 @@ static struct dev_pm_ops s3c_ts_pmops = {
#endif
static struct platform_device_id s3cts_driver_ids[] = {
- { "s3c2410-ts", 0 },
- { "s3c2440-ts", 1 },
+ { "s3c64xx-ts", FEAT_PEN_IRQ },
{ }
};
MODULE_DEVICE_TABLE(platform, s3cts_driver_ids);
static struct platform_driver s3c_ts_driver = {
.driver = {
- .name = "s3c24xx-ts",
+ .name = "samsung-ts",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &s3c_ts_pmops,
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 6/8] Input: s3c24xx_ts - Add FEAT for Samsung touchscreen support
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Naveen Krishna <ch.naveen@samsung.com>
This patch adds a feature bit field in the touchscreen driver for Samsung SoCs.
Which can be used to distinguish the TSADC module features.
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[ben-linux at fluff.org: minor fix to title]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
drivers/input/touchscreen/s3c2410_ts.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 86086a4..e0b7c83 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -55,6 +55,8 @@
S3C2410_ADCTSC_AUTO_PST | \
S3C2410_ADCTSC_XY_PST(0))
+#define FEAT_PEN_IRQ (1 << 0) /* HAS ADCCLRINTPNDNUP */
+
/* Per-touchscreen data. */
/**
@@ -69,6 +71,7 @@
* @irq_tc: The interrupt number for pen up/down interrupt
* @count: The number of samples collected.
* @shift: The log2 of the maximum count to read in one go.
+ * @features: The features supported by the TSADC MOdule.
*/
struct s3c2410ts {
struct s3c_adc_client *client;
@@ -81,6 +84,7 @@ struct s3c2410ts {
int irq_tc;
int count;
int shift;
+ int features;
};
static struct s3c2410ts ts;
@@ -171,6 +175,11 @@ static irqreturn_t stylus_irq(int irq, void *dev_id)
else
dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count);
+ if (ts.features & FEAT_PEN_IRQ) {
+ /* Clear pen down/up interrupt */
+ writel(0x0, ts.io + S3C64XX_ADCCLRINTPNDNUP);
+ }
+
return IRQ_HANDLED;
}
@@ -317,6 +326,7 @@ static int __devinit s3c2410ts_probe(struct platform_device *pdev)
ts.input->id.version = 0x0102;
ts.shift = info->oversampling_shift;
+ ts.features = platform_get_device_id(pdev)->driver_data;
ret = request_irq(ts.irq_tc, stylus_irq, IRQF_DISABLED,
"s3c2410_ts_pen", ts.input);
@@ -403,15 +413,14 @@ static struct dev_pm_ops s3c_ts_pmops = {
#endif
static struct platform_device_id s3cts_driver_ids[] = {
- { "s3c2410-ts", 0 },
- { "s3c2440-ts", 1 },
+ { "s3c64xx-ts", FEAT_PEN_IRQ },
{ }
};
MODULE_DEVICE_TABLE(platform, s3cts_driver_ids);
static struct platform_driver s3c_ts_driver = {
.driver = {
- .name = "s3c24xx-ts",
+ .name = "samsung-ts",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &s3c_ts_pmops,
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 7/8] Input: s3c24xx_ts - depend on SAMSUNG_DEV_TS and update menu entry
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:12 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input
Cc: kgene.kim, ch.naveen, dmitry.torokhov, Ben Dooks
Make the driver depend on either ARCH_S3C2410 (as legacy) or the new
device selection of SAMSUNG_DEV_TS.
Change the menuconfig name to reflect this driver is now handling more
devices that just the s3c2410.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
drivers/input/touchscreen/Kconfig | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 8a8fa4d..77a50d9 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -158,8 +158,8 @@ config TOUCHSCREEN_FUJITSU
module will be called fujitsu-ts.
config TOUCHSCREEN_S3C2410
- tristate "Samsung S3C2410 touchscreen input driver"
- depends on ARCH_S3C2410
+ tristate "Samsung S3C2410/generic touchscreen input driver"
+ depends on ARCH_S3C2410 || SAMSUNG_DEV_TS
select S3C24XX_ADC
help
Say Y here if you have the s3c2410 touchscreen.
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 7/8] Input: s3c24xx_ts - depend on SAMSUNG_DEV_TS and update menu entry
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
Make the driver depend on either ARCH_S3C2410 (as legacy) or the new
device selection of SAMSUNG_DEV_TS.
Change the menuconfig name to reflect this driver is now handling more
devices that just the s3c2410.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
drivers/input/touchscreen/Kconfig | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 8a8fa4d..77a50d9 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -158,8 +158,8 @@ config TOUCHSCREEN_FUJITSU
module will be called fujitsu-ts.
config TOUCHSCREEN_S3C2410
- tristate "Samsung S3C2410 touchscreen input driver"
- depends on ARCH_S3C2410
+ tristate "Samsung S3C2410/generic touchscreen input driver"
+ depends on ARCH_S3C2410 || SAMSUNG_DEV_TS
select S3C24XX_ADC
help
Say Y here if you have the s3c2410 touchscreen.
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 8/8] Input: s3c24xx_ts - fix selection of S3C_ADC
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:12 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-input
Cc: kgene.kim, ch.naveen, dmitry.torokhov, Ben Dooks
The change from S3C24XX_ADC to S3C_ADC missed changing the input
driver entry for the s3c2410 touchscreen, so fix the selection
of CONFIG_S3C_ADC.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
drivers/input/touchscreen/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 77a50d9..af57d3f 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -160,7 +160,7 @@ config TOUCHSCREEN_FUJITSU
config TOUCHSCREEN_S3C2410
tristate "Samsung S3C2410/generic touchscreen input driver"
depends on ARCH_S3C2410 || SAMSUNG_DEV_TS
- select S3C24XX_ADC
+ select S3C_ADC
help
Say Y here if you have the s3c2410 touchscreen.
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 8/8] Input: s3c24xx_ts - fix selection of S3C_ADC
@ 2010-05-19 6:12 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:12 UTC (permalink / raw)
To: linux-arm-kernel
The change from S3C24XX_ADC to S3C_ADC missed changing the input
driver entry for the s3c2410 touchscreen, so fix the selection
of CONFIG_S3C_ADC.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
drivers/input/touchscreen/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 77a50d9..af57d3f 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -160,7 +160,7 @@ config TOUCHSCREEN_FUJITSU
config TOUCHSCREEN_S3C2410
tristate "Samsung S3C2410/generic touchscreen input driver"
depends on ARCH_S3C2410 || SAMSUNG_DEV_TS
- select S3C24XX_ADC
+ select S3C_ADC
help
Say Y here if you have the s3c2410 touchscreen.
--
1.6.3.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: Samsung touchscreen updates
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-19 6:34 ` Dmitry Torokhov
-1 siblings, 0 replies; 26+ messages in thread
From: Dmitry Torokhov @ 2010-05-19 6:34 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-arm-kernel, linux-input, kgene.kim, ch.naveen
On May 18, 2010, at 11:12 PM, Ben Dooks <ben-linux@fluff.org> wrote:
> Dimitry, this is a set of updates for the Samsung platform support for
> touchscreen devices and the drivers/input/touchscreen items for the
> s3c2410_ts driver.
>
> Since the changes have some interedependency, I would like permission
> to merge this via the Samsung platform tree with your acknowledgement
> for the drivers/input/touchscreen items.
>
> The arch/arm/* portions of this patchset have been included as FYI and
> to show other interested parties what is goign on.
>
> Please let me know what you think.
Yeah, it all looks Ok, please merge through your tree.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 26+ messages in thread
* Samsung touchscreen updates
@ 2010-05-19 6:34 ` Dmitry Torokhov
0 siblings, 0 replies; 26+ messages in thread
From: Dmitry Torokhov @ 2010-05-19 6:34 UTC (permalink / raw)
To: linux-arm-kernel
On May 18, 2010, at 11:12 PM, Ben Dooks <ben-linux@fluff.org> wrote:
> Dimitry, this is a set of updates for the Samsung platform support for
> touchscreen devices and the drivers/input/touchscreen items for the
> s3c2410_ts driver.
>
> Since the changes have some interedependency, I would like permission
> to merge this via the Samsung platform tree with your acknowledgement
> for the drivers/input/touchscreen items.
>
> The arch/arm/* portions of this patchset have been included as FYI and
> to show other interested parties what is goign on.
>
> Please let me know what you think.
Yeah, it all looks Ok, please merge through your tree.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Samsung touchscreen updates
2010-05-19 6:34 ` Dmitry Torokhov
@ 2010-05-19 6:41 ` Ben Dooks
-1 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:41 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Ben Dooks, linux-arm-kernel, linux-input, kgene.kim, ch.naveen
On Tue, May 18, 2010 at 11:34:51PM -0700, Dmitry Torokhov wrote:
> On May 18, 2010, at 11:12 PM, Ben Dooks <ben-linux@fluff.org> wrote:
>
>> Dimitry, this is a set of updates for the Samsung platform support for
>> touchscreen devices and the drivers/input/touchscreen items for the
>> s3c2410_ts driver.
>>
>> Since the changes have some interedependency, I would like permission
>> to merge this via the Samsung platform tree with your acknowledgement
>> for the drivers/input/touchscreen items.
>>
>> The arch/arm/* portions of this patchset have been included as FYI and
>> to show other interested parties what is goign on.
>>
>> Please let me know what you think.
>
> Yeah, it all looks Ok, please merge through your tree.
Just rememberred I acked Maurus' original 64xx patch, did that get
merged anywhere as I couldn't find it in the tree listed in MAINTAINERS?
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Samsung touchscreen updates
@ 2010-05-19 6:41 ` Ben Dooks
0 siblings, 0 replies; 26+ messages in thread
From: Ben Dooks @ 2010-05-19 6:41 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, May 18, 2010 at 11:34:51PM -0700, Dmitry Torokhov wrote:
> On May 18, 2010, at 11:12 PM, Ben Dooks <ben-linux@fluff.org> wrote:
>
>> Dimitry, this is a set of updates for the Samsung platform support for
>> touchscreen devices and the drivers/input/touchscreen items for the
>> s3c2410_ts driver.
>>
>> Since the changes have some interedependency, I would like permission
>> to merge this via the Samsung platform tree with your acknowledgement
>> for the drivers/input/touchscreen items.
>>
>> The arch/arm/* portions of this patchset have been included as FYI and
>> to show other interested parties what is goign on.
>>
>> Please let me know what you think.
>
> Yeah, it all looks Ok, please merge through your tree.
Just rememberred I acked Maurus' original 64xx patch, did that get
merged anywhere as I couldn't find it in the tree listed in MAINTAINERS?
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Samsung touchscreen updates
2010-05-19 6:41 ` Ben Dooks
@ 2010-05-20 7:15 ` Dmitry Torokhov
-1 siblings, 0 replies; 26+ messages in thread
From: Dmitry Torokhov @ 2010-05-20 7:15 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-arm-kernel, linux-input, kgene.kim, ch.naveen
On Wed, May 19, 2010 at 07:41:38AM +0100, Ben Dooks wrote:
> On Tue, May 18, 2010 at 11:34:51PM -0700, Dmitry Torokhov wrote:
> > On May 18, 2010, at 11:12 PM, Ben Dooks <ben-linux@fluff.org> wrote:
> >
> >> Dimitry, this is a set of updates for the Samsung platform support for
> >> touchscreen devices and the drivers/input/touchscreen items for the
> >> s3c2410_ts driver.
> >>
> >> Since the changes have some interedependency, I would like permission
> >> to merge this via the Samsung platform tree with your acknowledgement
> >> for the drivers/input/touchscreen items.
> >>
> >> The arch/arm/* portions of this patchset have been included as FYI and
> >> to show other interested parties what is goign on.
> >>
> >> Please let me know what you think.
> >
> > Yeah, it all looks Ok, please merge through your tree.
>
> Just rememberred I acked Maurus' original 64xx patch, did that get
> merged anywhere as I couldn't find it in the tree listed in MAINTAINERS?
>
It looks like it got lost in my queue. The patch looks sane, would you
mind merging it with the rest of changes for s3c2140?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 26+ messages in thread
* Samsung touchscreen updates
@ 2010-05-20 7:15 ` Dmitry Torokhov
0 siblings, 0 replies; 26+ messages in thread
From: Dmitry Torokhov @ 2010-05-20 7:15 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 19, 2010 at 07:41:38AM +0100, Ben Dooks wrote:
> On Tue, May 18, 2010 at 11:34:51PM -0700, Dmitry Torokhov wrote:
> > On May 18, 2010, at 11:12 PM, Ben Dooks <ben-linux@fluff.org> wrote:
> >
> >> Dimitry, this is a set of updates for the Samsung platform support for
> >> touchscreen devices and the drivers/input/touchscreen items for the
> >> s3c2410_ts driver.
> >>
> >> Since the changes have some interedependency, I would like permission
> >> to merge this via the Samsung platform tree with your acknowledgement
> >> for the drivers/input/touchscreen items.
> >>
> >> The arch/arm/* portions of this patchset have been included as FYI and
> >> to show other interested parties what is goign on.
> >>
> >> Please let me know what you think.
> >
> > Yeah, it all looks Ok, please merge through your tree.
>
> Just rememberred I acked Maurus' original 64xx patch, did that get
> merged anywhere as I couldn't find it in the tree listed in MAINTAINERS?
>
It looks like it got lost in my queue. The patch looks sane, would you
mind merging it with the rest of changes for s3c2140?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 6/8] Input: s3c24xx_ts - Add FEAT for Samsung touchscreen support
2010-05-19 6:12 ` Ben Dooks
@ 2010-05-26 21:41 ` Vasily Khoruzhick
-1 siblings, 0 replies; 26+ messages in thread
From: Vasily Khoruzhick @ 2010-05-26 21:41 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Ben Dooks, linux-input, Naveen Krishna, kgene.kim,
dmitry.torokhov, ch.naveen
[-- Attachment #1: Type: Text/Plain, Size: 2710 bytes --]
В сообщении от 19 мая 2010 09:12:20 автор Ben Dooks написал:
> From: Naveen Krishna <ch.naveen@samsung.com>
>
> This patch adds a feature bit field in the touchscreen driver for Samsung
> SoCs. Which can be used to distinguish the TSADC module features.
>
> Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> [ben-linux@fluff.org: minor fix to title]
> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
> ---
> drivers/input/touchscreen/s3c2410_ts.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/touchscreen/s3c2410_ts.c
> b/drivers/input/touchscreen/s3c2410_ts.c index 86086a4..e0b7c83 100644
> --- a/drivers/input/touchscreen/s3c2410_ts.c
> +++ b/drivers/input/touchscreen/s3c2410_ts.c
> @@ -55,6 +55,8 @@
> S3C2410_ADCTSC_AUTO_PST | \
> S3C2410_ADCTSC_XY_PST(0))
>
> +#define FEAT_PEN_IRQ (1 << 0) /* HAS ADCCLRINTPNDNUP */
> +
> /* Per-touchscreen data. */
>
> /**
> @@ -69,6 +71,7 @@
> * @irq_tc: The interrupt number for pen up/down interrupt
> * @count: The number of samples collected.
> * @shift: The log2 of the maximum count to read in one go.
> + * @features: The features supported by the TSADC MOdule.
> */
> struct s3c2410ts {
> struct s3c_adc_client *client;
> @@ -81,6 +84,7 @@ struct s3c2410ts {
> int irq_tc;
> int count;
> int shift;
> + int features;
> };
>
> static struct s3c2410ts ts;
> @@ -171,6 +175,11 @@ static irqreturn_t stylus_irq(int irq, void *dev_id)
> else
> dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count);
>
> + if (ts.features & FEAT_PEN_IRQ) {
> + /* Clear pen down/up interrupt */
> + writel(0x0, ts.io + S3C64XX_ADCCLRINTPNDNUP);
> + }
> +
> return IRQ_HANDLED;
> }
>
> @@ -317,6 +326,7 @@ static int __devinit s3c2410ts_probe(struct
> platform_device *pdev) ts.input->id.version = 0x0102;
>
> ts.shift = info->oversampling_shift;
> + ts.features = platform_get_device_id(pdev)->driver_data;
>
> ret = request_irq(ts.irq_tc, stylus_irq, IRQF_DISABLED,
> "s3c2410_ts_pen", ts.input);
> @@ -403,15 +413,14 @@ static struct dev_pm_ops s3c_ts_pmops = {
> #endif
>
> static struct platform_device_id s3cts_driver_ids[] = {
> - { "s3c2410-ts", 0 },
> - { "s3c2440-ts", 1 },
> + { "s3c64xx-ts", FEAT_PEN_IRQ },
Why s3c24xx ids was removed? This driver doesn't attach on my rx1950 anymore
:\
Adding new devices is good thing, but breaking compatibility is evil :(
I'm a bit surprised that _this_ patch series was merged but was not tested on
s3c24xx-devices.
Regards
Vasily
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 6/8] Input: s3c24xx_ts - Add FEAT for Samsung touchscreen support
@ 2010-05-26 21:41 ` Vasily Khoruzhick
0 siblings, 0 replies; 26+ messages in thread
From: Vasily Khoruzhick @ 2010-05-26 21:41 UTC (permalink / raw)
To: linux-arm-kernel
? ????????? ?? 19 ??? 2010 09:12:20 ????? Ben Dooks ???????:
> From: Naveen Krishna <ch.naveen@samsung.com>
>
> This patch adds a feature bit field in the touchscreen driver for Samsung
> SoCs. Which can be used to distinguish the TSADC module features.
>
> Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> [ben-linux at fluff.org: minor fix to title]
> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
> ---
> drivers/input/touchscreen/s3c2410_ts.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/touchscreen/s3c2410_ts.c
> b/drivers/input/touchscreen/s3c2410_ts.c index 86086a4..e0b7c83 100644
> --- a/drivers/input/touchscreen/s3c2410_ts.c
> +++ b/drivers/input/touchscreen/s3c2410_ts.c
> @@ -55,6 +55,8 @@
> S3C2410_ADCTSC_AUTO_PST | \
> S3C2410_ADCTSC_XY_PST(0))
>
> +#define FEAT_PEN_IRQ (1 << 0) /* HAS ADCCLRINTPNDNUP */
> +
> /* Per-touchscreen data. */
>
> /**
> @@ -69,6 +71,7 @@
> * @irq_tc: The interrupt number for pen up/down interrupt
> * @count: The number of samples collected.
> * @shift: The log2 of the maximum count to read in one go.
> + * @features: The features supported by the TSADC MOdule.
> */
> struct s3c2410ts {
> struct s3c_adc_client *client;
> @@ -81,6 +84,7 @@ struct s3c2410ts {
> int irq_tc;
> int count;
> int shift;
> + int features;
> };
>
> static struct s3c2410ts ts;
> @@ -171,6 +175,11 @@ static irqreturn_t stylus_irq(int irq, void *dev_id)
> else
> dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count);
>
> + if (ts.features & FEAT_PEN_IRQ) {
> + /* Clear pen down/up interrupt */
> + writel(0x0, ts.io + S3C64XX_ADCCLRINTPNDNUP);
> + }
> +
> return IRQ_HANDLED;
> }
>
> @@ -317,6 +326,7 @@ static int __devinit s3c2410ts_probe(struct
> platform_device *pdev) ts.input->id.version = 0x0102;
>
> ts.shift = info->oversampling_shift;
> + ts.features = platform_get_device_id(pdev)->driver_data;
>
> ret = request_irq(ts.irq_tc, stylus_irq, IRQF_DISABLED,
> "s3c2410_ts_pen", ts.input);
> @@ -403,15 +413,14 @@ static struct dev_pm_ops s3c_ts_pmops = {
> #endif
>
> static struct platform_device_id s3cts_driver_ids[] = {
> - { "s3c2410-ts", 0 },
> - { "s3c2440-ts", 1 },
> + { "s3c64xx-ts", FEAT_PEN_IRQ },
Why s3c24xx ids was removed? This driver doesn't attach on my rx1950 anymore
:\
Adding new devices is good thing, but breaking compatibility is evil :(
I'm a bit surprised that _this_ patch series was merged but was not tested on
s3c24xx-devices.
Regards
Vasily
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100527/06a9e7e9/attachment-0001.sig>
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2010-05-26 21:43 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 5/8] Input: s3c24xx_ts - Implement generic GPIO configuration callback Ben Dooks
2010-05-19 6:12 ` 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
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.