summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNestor Lopez Casado <nlopezcasad@logitech.com>2013-06-19 11:10:12 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-09-04 22:28:57 +0200
commit9abc6d4b31289b0f4a7976b4ac5fe7ab7a4dced1 (patch)
tree1c4e4585d1e19c2b873367ae80188e19fffafe9c
parent803f6cf766227a365a2e4ef0ae5b4201a6cdfc5b (diff)
downloadlinux-9abc6d4b31289b0f4a7976b4ac5fe7ab7a4dced1.tar.gz
HID: hid-logitech-wtp, use flags MT_POINTER during slot init
Also clean up some debug messages
-rw-r--r--drivers/hid/hid-logitech-dj.c7
-rw-r--r--drivers/hid/hid-logitech-wtp.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 44c2462bfeae..73ef4f379ae9 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -290,7 +290,7 @@ static void logi_dj_print_raw_event(const char *header, u8 *data, int size)
strlcat(log, tmpstr, sizeof(log));
}
- dbg_hid("hid-logitech-dj:%s\n", log);
+ dbg_hid("%s\n", log);
}
static int logi_dj_output_hidraw_report(struct hid_device *hid, u8 * buf,
@@ -473,6 +473,7 @@ static void delayedwork_callback(struct work_struct *work)
return;
}
hidpp_connect_change(hidpp_dev, connected);
+ break;
default:
/* A normal report (i. e. not belonging to a pair/unpair notification)
* arriving here, means that the report arrived but we did not have a
@@ -493,7 +494,7 @@ static void delayedwork_callback(struct work_struct *work)
"%s:logi_dj_recv_query_paired_devices "
"error:%d\n", __func__, retval);
}
- dbg_hid("%s: unexpected report type\n", __func__);
+ dbg_hid("%s: unexpected report type:%x\n", __func__, dj_report.report_type);
}
}
@@ -607,7 +608,7 @@ static void logi_dj_recv_forward_raw_report(struct dj_receiver_dev *djrcv_dev,
error = hid_input_report(dj_dev->hdev, HID_INPUT_REPORT, data, size, 1);
if (error)
- dbg_hid("%s:hid_input_report returned error:%d", __func__, error);
+ dbg_hid("%s:hid_input_report returned error:%d\n", __func__, error);
}
static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev,
diff --git a/drivers/hid/hid-logitech-wtp.c b/drivers/hid/hid-logitech-wtp.c
index 31d445505e49..57648ca5b42d 100644
--- a/drivers/hid/hid-logitech-wtp.c
+++ b/drivers/hid/hid-logitech-wtp.c
@@ -680,6 +680,7 @@ static int wtp_process_event(struct hidpp_device *hidpp_dev,
/* sync now if there is no touch data following */
if (!event->has_abs) {
+ dbg_hid("%s:event consumed\n",__func__);
input_sync(fd->input);
return 1; /* we successfully consumed the event */
}
@@ -762,7 +763,7 @@ static int wtp_input_mapping(struct hid_device *hdev, struct hid_input *hi,
__set_bit(EV_ABS, input->evbit);
- input_mt_init_slots(input, SLOT_COUNT);
+ input_mt_init_slots(input, SLOT_COUNT, INPUT_MT_POINTER);
input_set_capability(input, EV_KEY, BTN_TOUCH);
@@ -877,6 +878,7 @@ static int wtp_probe(struct hid_device *hdev, const struct hid_device_id *id)
hid_device_io_start(hdev);
/* Get hid++ version number */
+ dbg_hid("Requesting HIDPP version\n");
ret = hidpp_send_hidpp2_sync(hidpp_device, REPORT_ID_HIDPP_LONG,
0, 1,
SOFTWARE_ID,