aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-03-28 03:52:36 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-03-28 04:10:11 -0400
commite545ef39e06e7b1df2ef9ddbbf665b74c4e1878a (patch)
tree44a245210306f0cd664bc2c3c1a03e479163d864 /drivers/input/touchscreen
parent9732e5b0bf87a1b0457be1c5d38262babc4cd2ae (diff)
Input: remove obsolete tnetv107x drivers
The tnetv107x platform is getting removed, so the touchscreen and keypad drivers for this platform will no longer be needed either. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Kevin Hilman <khilman@linaro.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/Kconfig9
-rw-r--r--drivers/input/touchscreen/Makefile1
-rw-r--r--drivers/input/touchscreen/tnetv107x-ts.c384
3 files changed, 0 insertions, 394 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 07e9e82029d1..68edc9db2c64 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -514,15 +514,6 @@ config TOUCHSCREEN_MIGOR
514 To compile this driver as a module, choose M here: the 514 To compile this driver as a module, choose M here: the
515 module will be called migor_ts. 515 module will be called migor_ts.
516 516
517config TOUCHSCREEN_TNETV107X
518 tristate "TI TNETV107X touchscreen support"
519 depends on ARCH_DAVINCI_TNETV107X
520 help
521 Say Y here if you want to use the TNETV107X touchscreen.
522
523 To compile this driver as a module, choose M here: the
524 module will be called tnetv107x-ts.
525
526config TOUCHSCREEN_TOUCHRIGHT 517config TOUCHSCREEN_TOUCHRIGHT
527 tristate "Touchright serial touchscreen" 518 tristate "Touchright serial touchscreen"
528 select SERIO 519 select SERIO
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index 62801f213346..4bc954b7c7c3 100644
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -56,7 +56,6 @@ obj-$(CONFIG_TOUCHSCREEN_ST1232) += st1232.o
56obj-$(CONFIG_TOUCHSCREEN_STMPE) += stmpe-ts.o 56obj-$(CONFIG_TOUCHSCREEN_STMPE) += stmpe-ts.o
57obj-$(CONFIG_TOUCHSCREEN_SUR40) += sur40.o 57obj-$(CONFIG_TOUCHSCREEN_SUR40) += sur40.o
58obj-$(CONFIG_TOUCHSCREEN_TI_AM335X_TSC) += ti_am335x_tsc.o 58obj-$(CONFIG_TOUCHSCREEN_TI_AM335X_TSC) += ti_am335x_tsc.o
59obj-$(CONFIG_TOUCHSCREEN_TNETV107X) += tnetv107x-ts.o
60obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213) += touchit213.o 59obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213) += touchit213.o
61obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o 60obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o
62obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o 61obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
diff --git a/drivers/input/touchscreen/tnetv107x-ts.c b/drivers/input/touchscreen/tnetv107x-ts.c
deleted file mode 100644
index c47827a26e3c..000000000000
--- a/drivers/input/touchscreen/tnetv107x-ts.c
+++ /dev/null
@@ -1,384 +0,0 @@
1/*
2 * Texas Instruments TNETV107X Touchscreen Driver
3 *
4 * Copyright (C) 2010 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#include <linux/module.h>
17#include <linux/kernel.h>
18#include <linux/err.h>
19#include <linux/errno.h>
20#include <linux/input.h>
21#include <linux/platform_device.h>
22#include <linux/interrupt.h>
23#include <linux/slab.h>
24#include <linux/delay.h>
25#include <linux/ctype.h>
26#include <linux/io.h>
27#include <linux/clk.h>
28
29#include <mach/tnetv107x.h>
30
31#define TSC_PENUP_POLL (HZ / 5)
32#define IDLE_TIMEOUT 100 /* msec */
33
34/*
35 * The first and last samples of a touch interval are usually garbage and need
36 * to be filtered out with these devices. The following definitions control
37 * the number of samples skipped.
38 */
39#define TSC_HEAD_SKIP 1
40#define TSC_TAIL_SKIP 1
41#define TSC_SKIP (TSC_HEAD_SKIP + TSC_TAIL_SKIP + 1)
42#define TSC_SAMPLES (TSC_SKIP + 1)
43
44/* Register Offsets */
45struct tsc_regs {
46 u32 rev;
47 u32 tscm;
48 u32 bwcm;
49 u32 swc;
50 u32 adcchnl;
51 u32 adcdata;
52 u32 chval[4];
53};
54
55/* TSC Mode Configuration Register (tscm) bits */
56#define WMODE BIT(0)
57#define TSKIND BIT(1)
58#define ZMEASURE_EN BIT(2)
59#define IDLE BIT(3)
60#define TSC_EN BIT(4)
61#define STOP BIT(5)
62#define ONE_SHOT BIT(6)
63#define SINGLE BIT(7)
64#define AVG BIT(8)
65#define AVGNUM(x) (((x) & 0x03) << 9)
66#define PVSTC(x) (((x) & 0x07) << 11)
67#define PON BIT(14)
68#define PONBG BIT(15)
69#define AFERST BIT(16)
70
71/* ADC DATA Capture Register bits */
72#define DATA_VALID BIT(16)
73
74/* Register Access Macros */
75#define tsc_read(ts, reg) __raw_readl(&(ts)->regs->reg)
76#define tsc_write(ts, reg, val) __raw_writel(val, &(ts)->regs->reg);
77#define tsc_set_bits(ts, reg, val) \
78 tsc_write(ts, reg, tsc_read(ts, reg) | (val))
79#define tsc_clr_bits(ts, reg, val) \
80 tsc_write(ts, reg, tsc_read(ts, reg) & ~(val))
81
82struct sample {
83 int x, y, p;
84};
85
86struct tsc_data {
87 struct input_dev *input_dev;
88 struct resource *res;
89 struct tsc_regs __iomem *regs;
90 struct timer_list timer;
91 spinlock_t lock;
92 struct clk *clk;
93 struct device *dev;
94 int sample_count;
95 struct sample samples[TSC_SAMPLES];
96 int tsc_irq;
97};
98
99static int tsc_read_sample(struct tsc_data *ts, struct sample* sample)
100{
101 int x, y, z1, z2, t, p = 0;
102 u32 val;
103
104 val = tsc_read(ts, chval[0]);
105 if (val & DATA_VALID)
106 x = val & 0xffff;
107 else
108 return -EINVAL;
109
110 y = tsc_read(ts, chval[1]) & 0xffff;
111 z1 = tsc_read(ts, chval[2]) & 0xffff;
112 z2 = tsc_read(ts, chval[3]) & 0xffff;
113
114 if (z1) {
115 t = ((600 * x) * (z2 - z1));
116 p = t / (u32) (z1 << 12);
117 if (p < 0)
118 p = 0;
119 }
120
121 sample->x = x;
122 sample->y = y;
123 sample->p = p;
124
125 return 0;
126}
127
128static void tsc_poll(unsigned long data)
129{
130 struct tsc_data *ts = (struct tsc_data *)data;
131 unsigned long flags;
132 int i, val, x, y, p;
133
134 spin_lock_irqsave(&ts->lock, flags);
135
136 if (ts->sample_count >= TSC_SKIP) {
137 input_report_abs(ts->input_dev, ABS_PRESSURE, 0);
138 input_report_key(ts->input_dev, BTN_TOUCH, 0);
139 input_sync(ts->input_dev);
140 } else if (ts->sample_count > 0) {
141 /*
142 * A touch event lasted less than our skip count. Salvage and
143 * report anyway.
144 */
145 for (i = 0, val = 0; i < ts->sample_count; i++)
146 val += ts->samples[i].x;
147 x = val / ts->sample_count;
148
149 for (i = 0, val = 0; i < ts->sample_count; i++)
150 val += ts->samples[i].y;
151 y = val / ts->sample_count;
152
153 for (i = 0, val = 0; i < ts->sample_count; i++)
154 val += ts->samples[i].p;
155 p = val / ts->sample_count;
156
157 input_report_abs(ts->input_dev, ABS_X, x);
158 input_report_abs(ts->input_dev, ABS_Y, y);
159 input_report_abs(ts->input_dev, ABS_PRESSURE, p);
160 input_report_key(ts->input_dev, BTN_TOUCH, 1);
161 input_sync(ts->input_dev);
162 }