Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: jornada720_ts - fix build error ( LONG() usage )
  Input: bcm5974 - switch back to normal mode when closing
  • Loading branch information
Linus Torvalds committed Sep 22, 2008
2 parents 18f22fb + 1577e4b commit ae91119
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions drivers/input/mouse/bcm5974.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,9 @@ static int report_tp_state(struct bcm5974 *dev, int size)
#define BCM5974_WELLSPRING_MODE_REQUEST_VALUE 0x300
#define BCM5974_WELLSPRING_MODE_REQUEST_INDEX 0
#define BCM5974_WELLSPRING_MODE_VENDOR_VALUE 0x01
#define BCM5974_WELLSPRING_MODE_NORMAL_VALUE 0x08

static int bcm5974_wellspring_mode(struct bcm5974 *dev)
static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
{
char *data = kmalloc(8, GFP_KERNEL);
int retval = 0, size;
Expand All @@ -377,7 +378,9 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev)
}

/* apply the mode switch */
data[0] = BCM5974_WELLSPRING_MODE_VENDOR_VALUE;
data[0] = on ?
BCM5974_WELLSPRING_MODE_VENDOR_VALUE :
BCM5974_WELLSPRING_MODE_NORMAL_VALUE;

/* write configuration */
size = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
Expand All @@ -392,7 +395,8 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev)
goto out;
}

dprintk(2, "bcm5974: switched to wellspring mode.\n");
dprintk(2, "bcm5974: switched to %s mode.\n",
on ? "wellspring" : "normal");

out:
kfree(data);
Expand Down Expand Up @@ -481,7 +485,7 @@ static void bcm5974_irq_trackpad(struct urb *urb)
*/
static int bcm5974_start_traffic(struct bcm5974 *dev)
{
if (bcm5974_wellspring_mode(dev)) {
if (bcm5974_wellspring_mode(dev, true)) {
dprintk(1, "bcm5974: mode switch failed\n");
goto error;
}
Expand All @@ -504,6 +508,7 @@ static void bcm5974_pause_traffic(struct bcm5974 *dev)
{
usb_kill_urb(dev->tp_urb);
usb_kill_urb(dev->bt_urb);
bcm5974_wellspring_mode(dev, false);
}

/*
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/touchscreen/jornada720_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ static int __devinit jornada720_ts_probe(struct platform_device *pdev)
input_dev->id.bustype = BUS_HOST;
input_dev->dev.parent = &pdev->dev;

input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
input_set_abs_params(input_dev, ABS_X, 270, 3900, 0, 0);
input_set_abs_params(input_dev, ABS_Y, 180, 3700, 0, 0);

Expand Down

0 comments on commit ae91119

Please sign in to comment.