From: Dmitry Torokhov Date: Tue, 29 Nov 2011 09:51:07 +0000 (-0800) Subject: Merge commit 'v3.2-rc3' into next X-Git-Tag: v4.6-rc1~9^2~1310 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4;p=platform%2Fkernel%2Flinux-exynos.git Merge commit 'v3.2-rc3' into next --- 0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4 diff --cc drivers/input/mouse/elantech.c index 59bfb70,e2a9867..d2c0db1 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@@ -1262,24 -1210,32 +1262,34 @@@ static int elantech_reconnect(struct ps */ static int elantech_set_properties(struct elantech_data *etd) { + /* This represents the version of IC body. */ int ver = (etd->fw_version & 0x0f0000) >> 16; + /* Early version of Elan touchpads doesn't obey the rule. */ if (etd->fw_version < 0x020030 || etd->fw_version == 0x020600) etd->hw_version = 1; - else if (etd->fw_version < 0x150600) - etd->hw_version = 2; - else if (ver == 5) - etd->hw_version = 3; - else if (ver == 6) - etd->hw_version = 4; - else - return -1; + else { + switch (ver) { + case 2: + case 4: + etd->hw_version = 2; + break; + case 5: + etd->hw_version = 3; + break; + case 6: + etd->hw_version = 4; + break; + default: + return -1; + } + } - /* - * Turn on packet checking by default. - */ + /* decide which send_cmd we're gonna use early */ + etd->send_cmd = etd->hw_version >= 3 ? elantech_send_cmd : + synaptics_send_cmd; + + /* Turn on packet checking by default */ etd->paritycheck = 1; /* diff --cc drivers/input/tablet/wacom_wac.c index 6b9adc7,da0d8761e..ecfcbc8 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@@ -799,15 -799,10 +799,13 @@@ static int wacom_bpt_touch(struct wacom unsigned char *data = wacom->data; int i; + if (data[0] != 0x02) + return 0; + for (i = 0; i < 2; i++) { - int p = data[9 * i + 2]; - bool touch = p && !wacom->shared->stylus_in_proximity; + int offset = (data[1] & 0x80) ? (8 * i) : (9 * i); + bool touch = data[offset + 3] & 0x80; - input_mt_slot(input, i); - input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); /* * Touch events need to be disabled while stylus is * in proximity because user's hand is resting on touchpad