aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-10-14 17:24:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-10-14 17:24:51 -0400
commit7e69a8c4d06b7ecb874f571e82b715a9f79bc3c4 (patch)
tree0248fb8f7a3e445cc3c744252abeecabb9205c05 /drivers/input
parentb6825d2df55aa7d7341c715b577b73a6a03dc944 (diff)
parentd5120ae72a066b18f98e0c45ce73262f58030851 (diff)
Merge branch 's3c-move' into devel
Conflicts: arch/arm/mach-versatile/core.c
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/bcm5974.c13
-rw-r--r--drivers/input/touchscreen/jornada720_ts.c4
2 files changed, 11 insertions, 6 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 18f4d7f6ce6d..2998a6ac9ae4 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -351,8 +351,9 @@ static int report_tp_state(struct bcm5974 *dev, int size)
351#define BCM5974_WELLSPRING_MODE_REQUEST_VALUE 0x300 351#define BCM5974_WELLSPRING_MODE_REQUEST_VALUE 0x300
352#define BCM5974_WELLSPRING_MODE_REQUEST_INDEX 0 352#define BCM5974_WELLSPRING_MODE_REQUEST_INDEX 0
353#define BCM5974_WELLSPRING_MODE_VENDOR_VALUE 0x01 353#define BCM5974_WELLSPRING_MODE_VENDOR_VALUE 0x01
354#define BCM5974_WELLSPRING_MODE_NORMAL_VALUE 0x08
354 355
355static int bcm5974_wellspring_mode(struct bcm5974 *dev) 356static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
356{ 357{
357 char *data = kmalloc(8, GFP_KERNEL); 358 char *data = kmalloc(8, GFP_KERNEL);
358 int retval = 0, size; 359 int retval = 0, size;
@@ -377,7 +378,9 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev)
377 } 378 }
378 379
379 /* apply the mode switch */ 380 /* apply the mode switch */
380 data[0] = BCM5974_WELLSPRING_MODE_VENDOR_VALUE; 381 data[0] = on ?
382 BCM5974_WELLSPRING_MODE_VENDOR_VALUE :
383 BCM5974_WELLSPRING_MODE_NORMAL_VALUE;
381 384
382 /* write configuration */ 385 /* write configuration */
383 size = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), 386 size = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
@@ -392,7 +395,8 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev)
392 goto out; 395 goto out;
393 } 396 }
394 397
395 dprintk(2, "bcm5974: switched to wellspring mode.\n"); 398 dprintk(2, "bcm5974: switched to %s mode.\n",
399 on ? "wellspring" : "normal");
396 400
397 out: 401 out:
398 kfree(data); 402 kfree(data);
@@ -481,7 +485,7 @@ exit:
481 */ 485 */
482static int bcm5974_start_traffic(struct bcm5974 *dev) 486static int bcm5974_start_traffic(struct bcm5974 *dev)
483{ 487{
484 if (bcm5974_wellspring_mode(dev)) { 488 if (bcm5974_wellspring_mode(dev, true)) {
485 dprintk(1, "bcm5974: mode switch failed\n"); 489 dprintk(1, "bcm5974: mode switch failed\n");
486 goto error; 490 goto error;
487 } 491 }
@@ -504,6 +508,7 @@ static void bcm5974_pause_traffic(struct bcm5974 *dev)
504{ 508{
505 usb_kill_urb(dev->tp_urb); 509 usb_kill_urb(dev->tp_urb);
506 usb_kill_urb(dev->bt_urb); 510 usb_kill_urb(dev->bt_urb);
511 bcm5974_wellspring_mode(dev, false);
507} 512}
508 513
509/* 514/*
diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c
index bf44f9d68342..c8b7e8a45c4d 100644
--- a/drivers/input/touchscreen/jornada720_ts.c
+++ b/drivers/input/touchscreen/jornada720_ts.c
@@ -119,8 +119,8 @@ static int __devinit jornada720_ts_probe(struct platform_device *pdev)
119 input_dev->id.bustype = BUS_HOST; 119 input_dev->id.bustype = BUS_HOST;
120 input_dev->dev.parent = &pdev->dev; 120 input_dev->dev.parent = &pdev->dev;
121 121
122 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 122 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
123 input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); 123 input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
124 input_set_abs_params(input_dev, ABS_X, 270, 3900, 0, 0); 124 input_set_abs_params(input_dev, ABS_X, 270, 3900, 0, 0);
125 input_set_abs_params(input_dev, ABS_Y, 180, 3700, 0, 0); 125 input_set_abs_params(input_dev, ABS_Y, 180, 3700, 0, 0);
126 126