diff options
| author | Richard Purdie <rpurdie@rpsys.net> | 2007-10-13 00:38:52 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2007-10-13 00:38:52 -0400 |
| commit | 70093178b6eda34e4a4fb18cc4a48a9eacc01d98 (patch) | |
| tree | 5e35093d48ef2604ab5f8b4d2796691bcc1142c1 /drivers/input | |
| parent | 8f740ef391fc81cb887fa08d213cf67b843cb3b7 (diff) | |
Input: remove tsdev interface
Remove the obsolete tsdev.c driver as scheduled.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/Kconfig | 22 | ||||
| -rw-r--r-- | drivers/input/Makefile | 1 | ||||
| -rw-r--r-- | drivers/input/tsdev.c | 700 |
3 files changed, 0 insertions, 723 deletions
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index 2d87357e2b..63512d906f 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig | |||
| @@ -114,28 +114,6 @@ config INPUT_JOYDEV | |||
| 114 | To compile this driver as a module, choose M here: the | 114 | To compile this driver as a module, choose M here: the |
| 115 | module will be called joydev. | 115 | module will be called joydev. |
| 116 | 116 | ||
| 117 | config INPUT_TSDEV | ||
| 118 | tristate "Touchscreen interface" | ||
| 119 | ---help--- | ||
| 120 | Say Y here if you have an application that only can understand the | ||
| 121 | Compaq touchscreen protocol for absolute pointer data. This is | ||
| 122 | useful namely for embedded configurations. | ||
| 123 | |||
| 124 | If unsure, say N. | ||
| 125 | |||
| 126 | To compile this driver as a module, choose M here: the | ||
| 127 | module will be called tsdev. | ||
| 128 | |||
| 129 | config INPUT_TSDEV_SCREEN_X | ||
| 130 | int "Horizontal screen resolution" | ||
| 131 | depends on INPUT_TSDEV | ||
| 132 | default "240" | ||
| 133 | |||
| 134 | config INPUT_TSDEV_SCREEN_Y | ||
| 135 | int "Vertical screen resolution" | ||
| 136 | depends on INPUT_TSDEV | ||
| 137 | default "320" | ||
| 138 | |||
| 139 | config INPUT_EVDEV | 117 | config INPUT_EVDEV |
| 140 | tristate "Event interface" | 118 | tristate "Event interface" |
| 141 | help | 119 | help |
diff --git a/drivers/input/Makefile b/drivers/input/Makefile index 15eb752697..99af903bd3 100644 --- a/drivers/input/Makefile +++ b/drivers/input/Makefile | |||
| @@ -13,7 +13,6 @@ obj-$(CONFIG_INPUT_POLLDEV) += input-polldev.o | |||
| 13 | obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o | 13 | obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o |
| 14 | obj-$(CONFIG_INPUT_JOYDEV) += joydev.o | 14 | obj-$(CONFIG_INPUT_JOYDEV) += joydev.o |
| 15 | obj-$(CONFIG_INPUT_EVDEV) += evdev.o | 15 | obj-$(CONFIG_INPUT_EVDEV) += evdev.o |
| 16 | obj-$(CONFIG_INPUT_TSDEV) += tsdev.o | ||
| 17 | obj-$(CONFIG_INPUT_EVBUG) += evbug.o | 16 | obj-$(CONFIG_INPUT_EVBUG) += evbug.o |
| 18 | 17 | ||
| 19 | obj-$(CONFIG_INPUT_KEYBOARD) += keyboard/ | 18 | obj-$(CONFIG_INPUT_KEYBOARD) += keyboard/ |
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c deleted file mode 100644 index 1202334937..0000000000 --- a/drivers/input/tsdev.c +++ /dev/null | |||
| @@ -1,700 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * $Id: tsdev.c,v 1.15 2002/04/10 16:50:19 jsimmons Exp $ | ||
| 3 | * | ||
| 4 | * Copyright (c) 2001 "Crazy" james Simmons | ||
| 5 | * | ||
| 6 | * Compaq touchscreen protocol driver. The protocol emulated by this driver | ||
| 7 | * is obsolete; for new programs use the tslib library which can read directly | ||
| 8 | * from evdev and perform dejittering, variance filtering and calibration - | ||
| 9 | * all in user space, not at kernel level. The meaning of this driver is | ||
| 10 | * to allow usage of newer input drivers with old applications that use the | ||
| 11 | * old /dev/h3600_ts and /dev/h3600_tsraw devices. | ||
| 12 | * | ||
| 13 | * 09-Apr-2004: Andrew Zabolotny <zap@homelink.ru> | ||
| 14 | * Fixed to actually work, not just output random numbers. | ||
| 15 | * Added support for both h3600_ts and h3600_tsraw protocol | ||
| 16 | * emulation. | ||
| 17 | */ | ||
| 18 | |||
| 19 | /* | ||
| 20 | * This program is free software; you can redistribute it and/or modify | ||
| 21 | * it under the terms of the GNU General Public License as published by | ||
| 22 | * the Free Software Foundation; either version 2 of the License, or | ||
| 23 | * (at your option) any later version. | ||
| 24 | * | ||
| 25 | * This program is distributed in the hope that it will be useful, | ||
| 26 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 27 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 28 | * GNU General Public License for more details. | ||
| 29 | * | ||
| 30 | * You should have received a copy of the GNU General Public License | ||
| 31 | * along with this program; if not, write to the Free Software | ||
| 32 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 33 | * | ||
| 34 | * Should you need to contact me, the author, you can do so either by | ||
| 35 | * e-mail - mail your message to <jsimmons@infradead.org>. | ||
| 36 | */ | ||
| 37 | |||
| 38 | #define TSDEV_MINOR_BASE 128 | ||
| 39 | #define TSDEV_MINORS 32 | ||
| 40 | /* First 16 devices are h3600_ts compatible; second 16 are h3600_tsraw */ | ||
| 41 | #define TSDEV_MINOR_MASK 15 | ||
| 42 | #define TSDEV_BUFFER_SIZE 64 | ||
| 43 | |||
| 44 | #include <linux/slab.h> | ||
| 45 | #include <linux/poll.h> | ||
| 46 | #include <linux/module.h> | ||
| 47 | #include <linux/moduleparam.h> | ||
| 48 | #include <linux/init.h> | ||
| 49 | #include <linux/input.h> | ||
| 50 | #include <linux/major.h> | ||
| 51 | #include <linux/random.h> | ||
| 52 | #include <linux/time.h> | ||
| 53 | #include <linux/device.h> | ||
| 54 | |||
| 55 | #ifndef CONFIG_INPUT_TSDEV_SCREEN_X | ||
| 56 | #define CONFIG_INPUT_TSDEV_SCREEN_X 240 | ||
| 57 | #endif | ||
| 58 | #ifndef CONFIG_INPUT_TSDEV_SCREEN_Y | ||
| 59 | #define CONFIG_INPUT_TSDEV_SCREEN_Y 320 | ||
| 60 | #endif | ||
| 61 | |||
| 62 | /* This driver emulates both protocols of the old h3600_ts and h3600_tsraw | ||
| 63 | * devices. The first one must output X/Y data in 'cooked' format, e.g. | ||
| 64 | * filtered, dejittered and calibrated. Second device just outputs raw | ||
| 65 | * data received from the hardware. | ||
| 66 | * | ||
| 67 | * This driver doesn't support filtering and dejittering; it supports only | ||
| 68 | * calibration. Filtering and dejittering must be done in the low-level | ||
| 69 | * driver, if needed, because it may gain additional benefits from knowing | ||
| 70 | * the low-level details, the nature of noise and so on. | ||
| 71 | * | ||
| 72 | * The driver precomputes a calibration matrix given the initial xres and | ||
| 73 | * yres values (quite innacurate for most touchscreens) that will result | ||
| 74 | * in a more or less expected range of output values. The driver supports | ||
| 75 | * the TS_SET_CAL ioctl, which will replace the calibration matrix with a | ||
| 76 | * new one, supposedly generated from the values taken from the raw device. | ||
| 77 | */ | ||
| 78 | |||
| 79 | MODULE_AUTHOR("James Simmons <jsimmons@transvirtual.com>"); | ||
| 80 | MODULE_DESCRIPTION("Input driver to touchscreen converter"); | ||
| 81 | MODULE_LICENSE("GPL"); | ||
| 82 | |||
| 83 | static int xres = CONFIG_INPUT_TSDEV_SCREEN_X; | ||
| 84 | module_param(xres, uint, 0); | ||
| 85 | MODULE_PARM_DESC(xres, "Horizontal screen resolution (can be negative for X-mirror)"); | ||
| 86 | |||
| 87 | static int yres = CONFIG_INPUT_TSDEV_SCREEN_Y; | ||
| 88 | module_param(yres, uint, 0); | ||
| 89 | MODULE_PARM_DESC(yres, "Vertical screen resolution (can be negative for Y-mirror)"); | ||
| 90 | |||
| 91 | /* From Compaq's Touch Screen Specification version 0.2 (draft) */ | ||
| 92 | struct ts_event { | ||
| 93 | short pressure; | ||
| 94 | short x; | ||
| 95 | short y; | ||
| 96 | short millisecs; | ||
| 97 | }; | ||
| 98 | |||
| 99 | struct ts_calibration { | ||
| 100 | int xscale; | ||
| 101 | int xtrans; | ||
| 102 | int yscale; | ||
| 103 | int ytrans; | ||
| 104 | int xyswap; | ||
| 105 | }; | ||
| 106 | |||
| 107 | struct tsdev { | ||
| 108 | int exist; | ||
| 109 | int open; | ||
| 110 | int minor; | ||
| 111 | char name[8]; | ||
| 112 | struct input_handle handle; | ||
| 113 | wait_queue_head_t wait; | ||
| 114 | struct list_head client_list; | ||
| 115 | spinlock_t client_lock; /* protects client_list */ | ||
| 116 | struct mutex mutex; | ||
| 117 | struct device dev; | ||
| 118 | |||
| 119 | int x, y, pressure; | ||
| 120 | struct ts_calibration cal; | ||
| 121 | }; | ||
| 122 | |||
| 123 | struct tsdev_client { | ||
| 124 | struct fasync_struct *fasync; | ||
| 125 | struct list_head node; | ||
| 126 | struct tsdev *tsdev; | ||
| 127 | struct ts_event buffer[TSDEV_BUFFER_SIZE]; | ||
| 128 | int head, tail; | ||
| 129 | spinlock_t buffer_lock; /* protects access to buffer, head and tail */ | ||
| 130 | int raw; | ||
| 131 | }; | ||
| 132 | |||
| 133 | /* The following ioctl codes are defined ONLY for backward compatibility. | ||
| 134 | * Don't use tsdev for new developement; use the tslib library instead. | ||
| 135 | * Touchscreen calibration is a fully userspace task. | ||
| 136 | */ | ||
| 137 | /* Use 'f' as magic number */ | ||
| 138 | #define IOC_H3600_TS_MAGIC 'f' | ||
| 139 | #define TS_GET_CAL _IOR(IOC_H3600_TS_MAGIC, 10, struct ts_calibration) | ||
| 140 | #define TS_SET_CAL _IOW(IOC_H3600_TS_MAGIC, 11, struct ts_calibration) | ||
| 141 | |||
| 142 | static struct tsdev *tsdev_table[TSDEV_MINORS/2]; | ||
| 143 | static DEFINE_MUTEX(tsdev_table_mutex); | ||
| 144 | |||
| 145 | static int tsdev_fasync(int fd, struct file *file, int on) | ||
| 146 | { | ||
| 147 | struct tsdev_client *client = file->private_data; | ||
| 148 | int retval; | ||
| 149 | |||
| 150 | retval = fasync_helper(fd, file, on, &client->fasync); | ||
| 151 | |||
| 152 | return retval < 0 ? retval : 0; | ||
| 153 | } | ||
| 154 | |||
| 155 | static void tsdev_free(struct device *dev) | ||
| 156 | { | ||
| 157 | struct tsdev *tsdev = container_of(dev, struct tsdev, dev); | ||
| 158 | |||
| 159 | kfree(tsdev); | ||
| 160 | } | ||
| 161 | |||
| 162 | static void tsdev_attach_client(struct tsdev *tsdev, struct tsdev_client *client) | ||
| 163 | { | ||
| 164 | spin_lock(&tsdev->client_lock); | ||
| 165 | list_add_tail_rcu(&client->node, &tsdev->client_list); | ||
| 166 | spin_unlock(&tsdev->client_lock); | ||
| 167 | synchronize_sched(); | ||
| 168 | } | ||
| 169 | |||
| 170 | static void tsdev_detach_client(struct tsdev *tsdev, struct tsdev_client *client) | ||
| 171 | { | ||
| 172 | |||
