summaryrefslogtreecommitdiffstats
path: root/drivers/hid/wacom_sys.c
diff options
context:
space:
mode:
authorLinus Torvalds2019-07-12 00:32:11 +0200
committerLinus Torvalds2019-07-12 00:32:11 +0200
commit4832a4dada1a2baefac76b70e4f3a78e71a7c35c (patch)
treec374b39ebbb7426693265d14412a1f271ecd775e /drivers/hid/wacom_sys.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/liv... (diff)
parentMerge branch 'for-5.3/uclogic' into for-linus (diff)
downloadkernel-qcow2-linux-4832a4dada1a2baefac76b70e4f3a78e71a7c35c.tar.gz
kernel-qcow2-linux-4832a4dada1a2baefac76b70e4f3a78e71a7c35c.tar.xz
kernel-qcow2-linux-4832a4dada1a2baefac76b70e4f3a78e71a7c35c.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina: - Documentation conversion to ReST, from Mauro Carvalho Chehab - Wacom MobileStudio Pro support, from Ping Cheng - Wacom 2nd Gen Intuos Pro Small support, from Aaron Armstrong Skomra - assorted small fixes and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: Add another Primax PIXART OEM mouse quirk HID: wacom: generic: add touchring adjustment for 2nd Gen Pro Small docs: hid: convert to ReST HID: remove NO_D3 flag when remove driver HID: wacom: add new MobileStudio Pro support HID: wacom: generic: read the number of expected touches on a per collection basis HID: wacom: generic: support the 'report valid' usage for touch HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report HID: wacom: Add 2nd gen Intuos Pro Small support HID: uclogic: Add support for Ugee Rainbow CV720 HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices HID: logitech-hidpp: HID: make const array consumer_rdesc_start static HID: logitech-dj: make const array template static HID: wacom: correct touch resolution x/y typo HID: wacom: generic: Correct pad syncing HID: wacom: generic: only switch the mode on devices with LEDs HID: logitech-dj: Add usb-id for the 27MHz MX3000 receiver
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r--drivers/hid/wacom_sys.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 83dd3a2a7316..53bddb50aeba 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -304,18 +304,23 @@ static void wacom_feature_mapping(struct hid_device *hdev,
wacom_hid_usage_quirk(hdev, field, usage);
switch (equivalent_usage) {
+ case WACOM_HID_WD_TOUCH_RING_SETTING:
+ wacom->generic_has_leds = true;
+ break;
case HID_DG_CONTACTMAX:
/* leave touch_max as is if predefined */
if (!features->touch_max) {
/* read manually */
- data = kzalloc(2, GFP_KERNEL);
+ n = hid_report_len(field->report);
+ data = hid_alloc_report_buf(field->report, GFP_KERNEL);
if (!data)
break;
data[0] = field->report->id;
ret = wacom_get_report(hdev, HID_FEATURE_REPORT,
- data, 2, WAC_CMD_RETRIES);
- if (ret == 2) {
- features->touch_max = data[1];
+ data, n, WAC_CMD_RETRIES);
+ if (ret == n) {
+ ret = hid_report_raw_event(hdev,
+ HID_FEATURE_REPORT, data, n, 0);
} else {
features->touch_max = 16;
hid_warn(hdev, "wacom_feature_mapping: "