diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-23 11:11:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-23 11:11:43 -0400 |
commit | 31f6e1bd3b58c9a67e5ea0c2d372fbf5fc9e326d (patch) | |
tree | b0f75a9353f2e9a82c6839a4f507eeb40ffc5fc5 /drivers/input | |
parent | ad9ddd66c6e8a79630a975ff0bb8d45a11abe630 (diff) | |
parent | 230ffc8e348e7841b79fd7c659d16aa5d7ec8a69 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ads7846 - SPI_CPHA mode bugfix
Input: ads7846 - document that it handles tsc2046 too
Input: input-polldev - add module info
Input: ucb1x00-ts - remove commented out code
Input: ucb1400_ts - use sched_setscheduler()
Input: ALPS - force stream mode
Input: iforce - minor clean-ups
Input: iforce - fix force feedback not working
Input: adbhid - do not access input_dev->private directly
Input: logips2pp - add type 72 (PS/2 TrackMan Marble)
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/joystick/iforce/iforce-main.c | 4 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-packets.c | 10 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-usb.c | 5 | ||||
-rw-r--r-- | drivers/input/misc/input-polldev.c | 5 | ||||
-rw-r--r-- | drivers/input/mouse/alps.c | 58 | ||||
-rw-r--r-- | drivers/input/mouse/logips2pp.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/Kconfig | 8 | ||||
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 3 | ||||
-rw-r--r-- | drivers/input/touchscreen/ucb1400_ts.c | 4 |
9 files changed, 57 insertions, 41 deletions
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index fb129c479a66..682244b1c042 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c | |||
@@ -370,10 +370,8 @@ int iforce_init_device(struct iforce *iforce) | |||
370 | 370 | ||
371 | /* | 371 | /* |
372 | * Disable spring, enable force feedback. | 372 | * Disable spring, enable force feedback. |
373 | * FIXME: We should use iforce_set_autocenter() et al here. | ||
374 | */ | 373 | */ |
375 | 374 | iforce_set_autocenter(input_dev, 0); | |
376 | iforce_send_packet(iforce, FF_CMD_AUTOCENTER, "\004\000"); | ||
377 | 375 | ||
378 | /* | 376 | /* |
379 | * Find appropriate device entry | 377 | * Find appropriate device entry |
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 21c4e13d3a50..3154ccd74000 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c | |||
@@ -246,6 +246,8 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data) | |||
246 | 246 | ||
247 | int iforce_get_id_packet(struct iforce *iforce, char *packet) | 247 | int iforce_get_id_packet(struct iforce *iforce, char *packet) |
248 | { | 248 | { |
249 | int status; | ||
250 | |||
249 | switch (iforce->bus) { | 251 | switch (iforce->bus) { |
250 | 252 | ||
251 | case IFORCE_USB: | 253 | case IFORCE_USB: |
@@ -254,18 +256,22 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
254 | iforce->cr.bRequest = packet[0]; | 256 | iforce->cr.bRequest = packet[0]; |
255 | iforce->ctrl->dev = iforce->usbdev; | 257 | iforce->ctrl->dev = iforce->usbdev; |
256 | 258 | ||
257 | if (usb_submit_urb(iforce->ctrl, GFP_ATOMIC)) | 259 | status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); |
260 | if (status) { | ||
261 | err("usb_submit_urb failed %d", status); | ||
258 | return -1; | 262 | return -1; |
263 | } | ||
259 | 264 | ||
260 | wait_event_interruptible_timeout(iforce->wait, | 265 | wait_event_interruptible_timeout(iforce->wait, |
261 | iforce->ctrl->status != -EINPROGRESS, HZ); | 266 | iforce->ctrl->status != -EINPROGRESS, HZ); |
262 | 267 | ||
263 | if (iforce->ctrl->status) { | 268 | if (iforce->ctrl->status) { |
269 | dbg("iforce->ctrl->status = %d", iforce->ctrl->status); | ||
264 | usb_unlink_urb(iforce->ctrl); | 270 | usb_unlink_urb(iforce->ctrl); |
265 | return -1; | 271 | return -1; |
266 | } | 272 | } |
267 | #else | 273 | #else |
268 | err("iforce_get_id_packet: iforce->bus = USB!"); | 274 | dbg("iforce_get_id_packet: iforce->bus = USB!"); |
269 | #endif | 275 | #endif |
270 | break; | 276 | break; |
271 | 277 | ||
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 750099d8e3c6..1457b73850e7 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c | |||
@@ -65,6 +65,7 @@ void iforce_usb_xmit(struct iforce *iforce) | |||
65 | XMIT_INC(iforce->xmit.tail, n); | 65 | XMIT_INC(iforce->xmit.tail, n); |
66 | 66 | ||
67 | if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { | 67 | if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { |
68 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); | ||
68 | warn("usb_submit_urb failed %d\n", n); | 69 | warn("usb_submit_urb failed %d\n", n); |
69 | } | 70 | } |
70 | 71 | ||
@@ -163,8 +164,8 @@ static int iforce_usb_probe(struct usb_interface *intf, | |||
163 | usb_fill_int_urb(iforce->irq, dev, usb_rcvintpipe(dev, epirq->bEndpointAddress), | 164 | usb_fill_int_urb(iforce->irq, dev, usb_rcvintpipe(dev, epirq->bEndpointAddress), |
164 | iforce->data, 16, iforce_usb_irq, iforce, epirq->bInterval); | 165 | iforce->data, 16, iforce_usb_irq, iforce, epirq->bInterval); |
165 | 166 | ||
166 | usb_fill_bulk_urb(iforce->out, dev, usb_sndbulkpipe(dev, epout->bEndpointAddress), | 167 | usb_fill_int_urb(iforce->out, dev, usb_sndintpipe(dev, epout->bEndpointAddress), |
167 | iforce + 1, 32, iforce_usb_out, iforce); | 168 | iforce + 1, 32, iforce_usb_out, iforce, epout->bInterval); |
168 | 169 | ||
169 | usb_fill_control_urb(iforce->ctrl, dev, usb_rcvctrlpipe(dev, 0), | 170 | usb_fill_control_urb(iforce->ctrl, dev, usb_rcvctrlpipe(dev, 0), |
170 | (void*) &iforce->cr, iforce->edata, 16, iforce_usb_ctrl, iforce); | 171 | (void*) &iforce->cr, iforce->edata, 16, iforce_usb_ctrl, iforce); |
diff --git a/drivers/input/misc/input-polldev.c b/drivers/input/misc/input-polldev.c index 1b2b9c9c5d88..b773d4c756a6 100644 --- a/drivers/input/misc/input-polldev.c +++ b/drivers/input/misc/input-polldev.c | |||
@@ -12,6 +12,11 @@ | |||
12 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
13 | #include <linux/input-polldev.h> | 13 | #include <linux/input-polldev.h> |
14 | 14 | ||
15 | MODULE_AUTHOR("Dmitry Torokhov <dtor@mail.ru>"); | ||
16 | MODULE_DESCRIPTION("Generic implementation of a polled input device"); | ||
17 | MODULE_LICENSE("GPL v2"); | ||
18 | MODULE_VERSION("0.1"); | ||
19 | |||
15 | static DEFINE_MUTEX(polldev_mutex); | 20 | static DEFINE_MUTEX(polldev_mutex); |
16 | static int polldev_users; | 21 | static int polldev_users; |
17 | static struct workqueue_struct *polldev_wq; | 22 | static struct workqueue_struct *polldev_wq; |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index cf3e4664e72b..2c5f11a4f6b4 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -251,11 +251,15 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int | |||
251 | 251 | ||
252 | dbg("E7 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]); | 252 | dbg("E7 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]); |
253 | 253 | ||
254 | for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++); | 254 | if (version) { |
255 | *version = (param[0] << 8) | (param[1] << 4) | i; | 255 | for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++) |
256 | /* empty */; | ||
257 | *version = (param[0] << 8) | (param[1] << 4) | i; | ||
258 | } | ||
256 | 259 | ||
257 | for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) | 260 | for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) |
258 | if (!memcmp(param, alps_model_data[i].signature, sizeof(alps_model_data[i].signature))) | 261 | if (!memcmp(param, alps_model_data[i].signature, |
262 | sizeof(alps_model_data[i].signature))) | ||
259 | return alps_model_data + i; | 263 | return alps_model_data + i; |
260 | 264 | ||
261 | return NULL; | 265 | return NULL; |
@@ -380,32 +384,46 @@ static int alps_poll(struct psmouse *psmouse) | |||
380 | return 0; | 384 | return 0; |
381 | } | 385 | } |
382 | 386 | ||
383 | static int alps_reconnect(struct psmouse *psmouse) | 387 | static int alps_hw_init(struct psmouse *psmouse, int *version) |
384 | { | 388 | { |
385 | struct alps_data *priv = psmouse->private; | 389 | struct alps_data *priv = psmouse->private; |
386 | int version; | ||
387 | |||
388 | psmouse_reset(psmouse); | ||
389 | 390 | ||
390 | if (!(priv->i = alps_get_model(psmouse, &version))) | 391 | priv->i = alps_get_model(psmouse, version); |
392 | if (!priv->i) | ||
391 | return -1; | 393 | return -1; |
392 | 394 | ||
393 | if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1)) | 395 | if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1)) |
394 | return -1; | 396 | return -1; |
395 | 397 | ||
396 | if (alps_tap_mode(psmouse, 1)) { | 398 | if (alps_tap_mode(psmouse, 1)) { |
397 | printk(KERN_WARNING "alps.c: Failed to reenable hardware tapping\n"); | 399 | printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n"); |
398 | return -1; | 400 | return -1; |
399 | } | 401 | } |
400 | 402 | ||
401 | if (alps_absolute_mode(psmouse)) { | 403 | if (alps_absolute_mode(psmouse)) { |
402 | printk(KERN_ERR "alps.c: Failed to reenable absolute mode\n"); | 404 | printk(KERN_ERR "alps.c: Failed to enable absolute mode\n"); |
403 | return -1; | 405 | return -1; |
404 | } | 406 | } |
405 | 407 | ||
406 | if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0)) | 408 | if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0)) |
407 | return -1; | 409 | return -1; |
408 | 410 | ||
411 | /* ALPS needs stream mode, otherwise it won't report any data */ | ||
412 | if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSTREAM)) { | ||
413 | printk(KERN_ERR "alps.c: Failed to enable stream mode\n"); | ||
414 | return -1; | ||
415 | } | ||
416 | |||
417 | return 0; | ||
418 | } | ||
419 | |||
420 | static int alps_reconnect(struct psmouse *psmouse) | ||
421 | { | ||
422 | psmouse_reset(psmouse); | ||
423 | |||
424 | if (alps_hw_init(psmouse, NULL)) | ||
425 | return -1; | ||
426 | |||
409 | return 0; | 427 | return 0; |
410 | } | 428 | } |
411 | 429 | ||
@@ -430,23 +448,9 @@ int alps_init(struct psmouse *psmouse) | |||
430 | goto init_fail; | 448 | goto init_fail; |
431 | 449 | ||
432 | priv->dev2 = dev2; | 450 | priv->dev2 = dev2; |
451 | psmouse->private = priv; | ||
433 | 452 | ||
434 | priv->i = alps_get_model(psmouse, &version); | 453 | if (alps_hw_init(psmouse, &version)) |
435 | if (!priv->i) | ||
436 | goto init_fail; | ||
437 | |||
438 | if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1)) | ||
439 | goto init_fail; | ||
440 | |||
441 | if (alps_tap_mode(psmouse, 1)) | ||
442 | printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n"); | ||
443 | |||
444 | if (alps_absolute_mode(psmouse)) { | ||
445 | printk(KERN_ERR "alps.c: Failed to enable absolute mode\n"); | ||
446 | goto init_fail; | ||
447 | } | ||
448 | |||
449 | if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0)) | ||
450 | goto init_fail; | 454 | goto init_fail; |
451 | 455 | ||
452 | dev1->evbit[LONG(EV_KEY)] |= BIT(EV_KEY); | 456 | dev1->evbit[LONG(EV_KEY)] |= BIT(EV_KEY); |
@@ -493,13 +497,13 @@ int alps_init(struct psmouse *psmouse) | |||
493 | /* We are having trouble resyncing ALPS touchpads so disable it for now */ | 497 | /* We are having trouble resyncing ALPS touchpads so disable it for now */ |
494 | psmouse->resync_time = 0; | 498 | psmouse->resync_time = 0; |
495 | 499 | ||
496 | psmouse->private = priv; | ||
497 | return 0; | 500 | return 0; |
498 | 501 | ||
499 | init_fail: | 502 | init_fail: |
500 | psmouse_reset(psmouse); | 503 | psmouse_reset(psmouse); |
501 | input_free_device(dev2); | 504 | input_free_device(dev2); |
502 | kfree(priv); | 505 | kfree(priv); |
506 | psmouse->private = NULL; | ||
503 | return -1; | 507 | return -1; |
504 | } | 508 | } |
505 | 509 | ||
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 9df74b72e6c4..0c5660d28caa 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c | |||
@@ -221,6 +221,7 @@ static const struct ps2pp_info *get_model_info(unsigned char model) | |||
221 | { 66, PS2PP_KIND_MX, /* MX3100 reciver */ | 221 | { 66, PS2PP_KIND_MX, /* MX3100 reciver */ |
222 | PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | | 222 | PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | |
223 | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN | PS2PP_HWHEEL }, | 223 | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN | PS2PP_HWHEEL }, |
224 | { 72, PS2PP_KIND_TRACKMAN, 0 }, /* T-CH11: TrackMan Marble */ | ||
224 | { 73, 0, PS2PP_SIDE_BTN }, | 225 | { 73, 0, PS2PP_SIDE_BTN }, |
225 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 226 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
226 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 227 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 4f091800bfeb..e5cca9bd0406 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -12,17 +12,17 @@ menuconfig INPUT_TOUCHSCREEN | |||
12 | if INPUT_TOUCHSCREEN | 12 | if INPUT_TOUCHSCREEN |
13 | 13 | ||
14 | config TOUCHSCREEN_ADS7846 | 14 | config TOUCHSCREEN_ADS7846 |
15 | tristate "ADS 7846/7843 based touchscreens" | 15 | tristate "ADS7846/TSC2046 and ADS7843 based touchscreens" |
16 | depends on SPI_MASTER | 16 | depends on SPI_MASTER |
17 | depends on HWMON = n || HWMON | 17 | depends on HWMON = n || HWMON |
18 | help | 18 | help |
19 | Say Y here if you have a touchscreen interface using the | 19 | Say Y here if you have a touchscreen interface using the |
20 | ADS7846 or ADS7843 controller, and your board-specific setup | 20 | ADS7846/TSC2046 or ADS7843 controller, and your board-specific |
21 | code includes that in its table of SPI devices. | 21 | setup code includes that in its table of SPI devices. |
22 | 22 | ||
23 | If HWMON is selected, and the driver is told the reference voltage | 23 | If HWMON is selected, and the driver is told the reference voltage |
24 | on your board, you will also get hwmon interfaces for the voltage | 24 | on your board, you will also get hwmon interfaces for the voltage |
25 | (and on ads7846, temperature) sensors of this chip. | 25 | (and on ads7846/tsc2046, temperature) sensors of this chip. |
26 | 26 | ||
27 | If unsure, say N (but it's safe to say "Y"). | 27 | If unsure, say N (but it's safe to say "Y"). |
28 | 28 | ||
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 693e3b2a65a3..1c9069cd3bae 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -39,6 +39,7 @@ | |||
39 | /* | 39 | /* |
40 | * This code has been heavily tested on a Nokia 770, and lightly | 40 | * This code has been heavily tested on a Nokia 770, and lightly |
41 | * tested on other ads7846 devices (OSK/Mistral, Lubbock). | 41 | * tested on other ads7846 devices (OSK/Mistral, Lubbock). |
42 | * TSC2046 is just newer ads7846 silicon. | ||
42 | * Support for ads7843 tested on Atmel at91sam926x-EK. | 43 | * Support for ads7843 tested on Atmel at91sam926x-EK. |
43 | * Support for ads7845 has only been stubbed in. | 44 | * Support for ads7845 has only been stubbed in. |
44 | * | 45 | * |
@@ -847,7 +848,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
847 | * may not. So we stick to very-portable 8 bit words, both RX and TX. | 848 | * may not. So we stick to very-portable 8 bit words, both RX and TX. |
848 | */ | 849 | */ |
849 | spi->bits_per_word = 8; | 850 | spi->bits_per_word = 8; |
850 | spi->mode = SPI_MODE_1; | 851 | spi->mode = SPI_MODE_0; |
851 | err = spi_setup(spi); | 852 | err = spi_setup(spi); |
852 | if (err < 0) | 853 | if (err < 0) |
853 | return err; | 854 | return err; |
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 6582816a0477..f0cbcdb008ed 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
@@ -288,9 +288,9 @@ static int ucb1400_ts_thread(void *_ucb) | |||
288 | struct ucb1400 *ucb = _ucb; | 288 | struct ucb1400 *ucb = _ucb; |
289 | struct task_struct *tsk = current; | 289 | struct task_struct *tsk = current; |
290 | int valid = 0; | 290 | int valid = 0; |
291 | struct sched_param param = { .sched_priority = 1 }; | ||
291 | 292 | ||
292 | tsk->policy = SCHED_FIFO; | 293 | sched_setscheduler(tsk, SCHED_FIFO, ¶m); |
293 | tsk->rt_priority = 1; | ||
294 | 294 | ||
295 | while (!kthread_should_stop()) { | 295 | while (!kthread_should_stop()) { |
296 | unsigned int x, y, p; | 296 | unsigned int x, y, p; |