aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/wacom_sys.c
diff options
context:
space:
mode:
authorPing Cheng <pingc@wacom.com>2006-09-26 16:34:47 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-17 17:46:30 -0400
commit8d32e3ae5972641ee9eb813e7a5c44a2b85d3694 (patch)
tree115d520ebc40873b268db11a88ab9a5c3a05c763 /drivers/usb/input/wacom_sys.c
parent64f89798da35f43c6ef6afda0541e25034513458 (diff)
USB: Wacom driver updates
This fixes some issues with the current wacom driver due to the split of the driver into different pieces and adds support for the Intuos3 4x6 Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/input/wacom_sys.c')
-rw-r--r--drivers/usb/input/wacom_sys.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/usb/input/wacom_sys.c b/drivers/usb/input/wacom_sys.c
index d233c37bd533..3c27f9b0aaa0 100644
--- a/drivers/usb/input/wacom_sys.c
+++ b/drivers/usb/input/wacom_sys.c
@@ -110,7 +110,7 @@ __u16 wacom_be16_to_cpu(unsigned char *data)
110__u16 wacom_le16_to_cpu(unsigned char *data) 110__u16 wacom_le16_to_cpu(unsigned char *data)
111{ 111{
112 __u16 value; 112 __u16 value;
113 value = be16_to_cpu(*(__be16 *) data); 113 value = le16_to_cpu(*(__le16 *) data);
114 return value; 114 return value;
115} 115}
116 116
@@ -143,7 +143,7 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
143 input_dev->evbit[0] |= BIT(EV_MSC); 143 input_dev->evbit[0] |= BIT(EV_MSC);
144 input_dev->mscbit[0] |= BIT(MSC_SERIAL); 144 input_dev->mscbit[0] |= BIT(MSC_SERIAL);
145 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); 145 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
146 input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3) | BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); 146 input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4);
147} 147}
148 148
149void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac) 149void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -155,11 +155,16 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
155 input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); 155 input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
156} 156}
157 157
158void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) 158void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
159{ 159{
160 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); 160 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
161 input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3) | BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); 161 input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
162 input_set_abs_params(input_dev, ABS_RX, 0, 4097, 0, 0); 162 input_set_abs_params(input_dev, ABS_RX, 0, 4097, 0, 0);
163}
164
165void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
166{
167 input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
163 input_set_abs_params(input_dev, ABS_RY, 0, 4097, 0, 0); 168 input_set_abs_params(input_dev, ABS_RY, 0, 4097, 0, 0);
164} 169}
165 170
@@ -244,7 +249,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
244 usb_fill_int_urb(wacom->irq, dev, 249 usb_fill_int_urb(wacom->irq, dev,
245 usb_rcvintpipe(dev, endpoint->bEndpointAddress), 250 usb_rcvintpipe(dev, endpoint->bEndpointAddress),
246 wacom_wac->data, wacom_wac->features->pktlen, 251 wacom_wac->data, wacom_wac->features->pktlen,
247 wacom_wac->features->irq, wacom, endpoint->bInterval); 252 wacom_sys_irq, wacom, endpoint->bInterval);
248 wacom->irq->transfer_dma = wacom->data_dma; 253 wacom->irq->transfer_dma = wacom->data_dma;
249 wacom->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; 254 wacom->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
250 255