Commit 8d32e3ae authored by Ping Cheng's avatar Ping Cheng Committed by Greg Kroah-Hartman

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: default avatarPing Cheng <pingc@wacom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 64f89798
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Multipart objects. # Multipart objects.
wacom-objs := wacom_sys.o wacom_wac.o wacom-objs := wacom_wac.o wacom_sys.o
usbhid-objs := hid-core.o usbhid-objs := hid-core.o
# Optional parts of multipart objects. # Optional parts of multipart objects.
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
* v1.46 (pc) - Split wacom.c into wacom_sys.c and wacom_wac.c, * v1.46 (pc) - Split wacom.c into wacom_sys.c and wacom_wac.c,
* - where wacom_sys.c deals with system specific code, * - where wacom_sys.c deals with system specific code,
* - and wacom_wac.c deals with Wacom specific code * - and wacom_wac.c deals with Wacom specific code
* - Support Intuos3 4x6
*/ */
/* /*
...@@ -118,6 +119,7 @@ extern void wacom_input_sync(void *wcombo); ...@@ -118,6 +119,7 @@ extern void wacom_input_sync(void *wcombo);
extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
extern void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
extern void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
extern void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
extern void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
extern void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
......
...@@ -110,7 +110,7 @@ __u16 wacom_be16_to_cpu(unsigned char *data) ...@@ -110,7 +110,7 @@ __u16 wacom_be16_to_cpu(unsigned char *data)
__u16 wacom_le16_to_cpu(unsigned char *data) __u16 wacom_le16_to_cpu(unsigned char *data)
{ {
__u16 value; __u16 value;
value = be16_to_cpu(*(__be16 *) data); value = le16_to_cpu(*(__le16 *) data);
return value; return value;
} }
...@@ -143,7 +143,7 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) ...@@ -143,7 +143,7 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC); input_dev->evbit[0] |= BIT(EV_MSC);
input_dev->mscbit[0] |= BIT(MSC_SERIAL); input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
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); input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4);
} }
void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac) void 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,11 +155,16 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
} }
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{ {
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
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); input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4097, 0, 0); input_set_abs_params(input_dev, ABS_RX, 0, 4097, 0, 0);
}
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4097, 0, 0); input_set_abs_params(input_dev, ABS_RY, 0, 4097, 0, 0);
} }
...@@ -244,7 +249,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i ...@@ -244,7 +249,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
usb_fill_int_urb(wacom->irq, dev, usb_fill_int_urb(wacom->irq, dev,
usb_rcvintpipe(dev, endpoint->bEndpointAddress), usb_rcvintpipe(dev, endpoint->bEndpointAddress),
wacom_wac->data, wacom_wac->features->pktlen, wacom_wac->data, wacom_wac->features->pktlen,
wacom_wac->features->irq, wacom, endpoint->bInterval); wacom_sys_irq, wacom, endpoint->bInterval);
wacom->irq->transfer_dma = wacom->data_dma; wacom->irq->transfer_dma = wacom->data_dma;
wacom->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; wacom->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
......
This diff is collapsed.
...@@ -20,6 +20,7 @@ enum { ...@@ -20,6 +20,7 @@ enum {
PTU, PTU,
PL, PL,
INTUOS, INTUOS,
INTUOS3S,
INTUOS3, INTUOS3,
INTUOS3L, INTUOS3L,
CINTIQ, CINTIQ,
...@@ -34,7 +35,6 @@ struct wacom_features { ...@@ -34,7 +35,6 @@ struct wacom_features {
int pressure_max; int pressure_max;
int distance_max; int distance_max;
int type; int type;
usb_complete_t irq;
}; };
struct wacom_wac { struct wacom_wac {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment