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 fb129c479a..682244b1c0 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 21c4e13d3a..3154ccd740 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 750099d8e3..1457b73850 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 1b2b9c9c5d..b773d4c756 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 cf3e4664e7..2c5f11a4f6 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)) | ||
