From: Jiri Kosina Date: Tue, 9 Jul 2019 23:39:57 +0000 (+0200) Subject: Merge branches 'for-5.2/fixes', 'for-5.3/doc', 'for-5.3/ish', 'for-5.3/logitech'... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=74acee309fb2;p=linux.git Merge branches 'for-5.2/fixes', 'for-5.3/doc', 'for-5.3/ish', 'for-5.3/logitech' and 'for-5.3/wacom' into for-linus --- 74acee309fb2a434dce215d44014e6f8e06975ae diff --cc drivers/hid/wacom_wac.c index 09b8e4aac82f4,43f6da3571659,43f6da3571659,747730d32ab62,35942bba5390f..8fc36a28081bb --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@@@@@ -1290,26 -1286,26 -1286,26 -1275,23 -1277,24 +1288,25 @@@@@@ static void wacom_intuos_pro2_bt_pen(st get_unaligned_le16(&frame[11])); } } --- -- input_report_abs(pen_input, ABS_PRESSURE, get_unaligned_le16(&frame[5])); - if (wacom->features.type == INTUOSP2_BT) { - if (wacom->features.type == INTUOSP2_BT || - wacom->features.type == INTUOSP2S_BT) { -- input_report_abs(pen_input, ABS_DISTANCE, -- range ? frame[13] : wacom->features.distance_max); -- } else { -- input_report_abs(pen_input, ABS_DISTANCE, -- range ? frame[7] : wacom->features.distance_max); -- } ++ if (wacom->tool[0]) { ++ input_report_abs(pen_input, ABS_PRESSURE, get_unaligned_le16(&frame[5])); ++ if (wacom->features.type == INTUOSP2_BT) { ++ input_report_abs(pen_input, ABS_DISTANCE, ++ range ? frame[13] : wacom->features.distance_max); ++ } else { ++ input_report_abs(pen_input, ABS_DISTANCE, ++ range ? frame[7] : wacom->features.distance_max); ++ } -- input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x01); -- input_report_key(pen_input, BTN_STYLUS, frame[0] & 0x02); -- input_report_key(pen_input, BTN_STYLUS2, frame[0] & 0x04); ++ input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x09); ++ input_report_key(pen_input, BTN_STYLUS, frame[0] & 0x02); ++ input_report_key(pen_input, BTN_STYLUS2, frame[0] & 0x04); -- input_report_key(pen_input, wacom->tool[0], prox); -- input_event(pen_input, EV_MSC, MSC_SERIAL, wacom->serial[0]); -- input_report_abs(pen_input, ABS_MISC, -- wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */ ++ input_report_key(pen_input, wacom->tool[0], prox); ++ input_event(pen_input, EV_MSC, MSC_SERIAL, wacom->serial[0]); ++ input_report_abs(pen_input, ABS_MISC, ++ wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */ ++ } wacom->shared->stylus_in_proximity = prox;