{
struct wacom_features *features = &wacom->features;
struct input_dev *input = wacom->input;
+ struct input_dev *pad_input = wacom->pad_input;
unsigned char *data = wacom->data;
int i;
input_mt_report_pointer_emulation(input, true);
- input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
- input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0);
- input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
- input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0);
-
- input_sync(input);
+ input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0);
+ input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0);
+ input_report_key(pad_input, BTN_BACK, (data[1] & 0x02) != 0);
+ input_report_key(pad_input, BTN_RIGHT, (data[1] & 0x01) != 0);
- return 0;
+ return 1;
}
static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)
{
- struct input_dev *input = wacom->input;
+ struct input_dev *input = wacom->pad_input;
struct wacom_features *features = &wacom->features;
if (features->type == INTUOSHT) {
}
input_mt_report_pointer_emulation(input, true);
- input_sync(input);
-
- return 0;
+ return 1;
}
static int wacom_bpt_pen(struct wacom_wac *wacom)
if (features->device_type == BTN_TOOL_FINGER) {
- __set_bit(BTN_LEFT, input_dev->keybit);
- __set_bit(BTN_FORWARD, input_dev->keybit);
- __set_bit(BTN_BACK, input_dev->keybit);
- __set_bit(BTN_RIGHT, input_dev->keybit);
-
if (features->touch_max) {
/* touch interface */
unsigned int flags = INPUT_MT_POINTER;
break;
+ case INTUOSHT:
+ case BAMBOO_PT:
+ /* pad device is on the touch interface */
+ if (features->device_type != BTN_TOOL_FINGER)
+ return 1;
+
+ __clear_bit(ABS_MISC, input_dev->absbit);
+
+ __set_bit(BTN_LEFT, input_dev->keybit);
+ __set_bit(BTN_FORWARD, input_dev->keybit);
+ __set_bit(BTN_BACK, input_dev->keybit);
+ __set_bit(BTN_RIGHT, input_dev->keybit);
+
+ break;
+
default:
/* no pad supported */
return 1;