multi-touch-dev team mailing list archive
-
multi-touch-dev team
-
Mailing list archive
-
Message #00549
[PATCH] Asus EeePC T91MT support
Hi Chase, folks on the list,
this week end, I have in my hands an EeePC T91MT from Asus. The support
of the dual touch screen is not working out of the box in Maverick.
I attached 2 (in fact 3) patches to support this device in Maverick:
1) the file named hid-core.c.patch:
This patch is already upstream (2.6.36), so it is really safe...
The idea is that there were a miss when hid-mosart had been pushed:
instead of adding the description (VendorID, DeviceID) in hid_blacklist,
it had been added to hid_ignore. The result is that the kernel totally
ignores the device, which is quite confusing for users.
2) the file named hid-mosart.c.patch (part 1):
I had to add a case in mosart_input_mapping for the device to be
recognized as a touchscreen, and not a touchpad by xf86-input-evdev.
The device has 2 modes. The first one is an emulation of a touchscreen
by sending left and right button, and the second mode is the one used in
dual-touch (sending trackingID, touch and else).
That's why there is a hid report containing left and right buttons
(9000001 and 9000002). The point is that xorg relies on these fields to
determine if it's a touchpad or a touchscreen.
Clearing the report (return -1) makes xorg detecting it out of the box
as a quite pleasant (dual)touchscreen.
3) the file named hid-mosart.c.patch again (part 2 -> between the #ifdef
CONFIG_PM):
In case of a suspend/resume, the device switch back to the first mode
described above (with left and right buttons).
The patch adds a hook in .reset_resume for the device to be switched to
the correct mode (I just copy the code in mosart_probe).
I was wondering whether it was possible to include this patchwork in a
next release of the kernel in Maverick. I think people that have a T91MT
and all the other hid-mosart owners would be very pleased to have their
device supported.
Cheers,
Benjamin
--- hid-core.c.orig 2010-10-24 01:01:53.820056239 +0200
+++ linux-2.6.35/drivers/hid/hid-core.c 2010-10-24 01:02:57.976056320 +0200
@@ -1281,6 +1281,7 @@ static const struct hid_device_id hid_bl
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_T91MT)},
{ HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) },
{ HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH) },
@@ -1572,7 +1573,6 @@ static const struct hid_device_id hid_ig
{ HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24) },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) },
- { HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_T91MT)},
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)},
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)},
{ HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
--- hid-mosart.c.orig 2010-08-02 00:11:14.000000000 +0200
+++ linux-2.6.35/drivers/hid/hid-mosart.c 2010-10-24 01:05:42.956055207 +0200
@@ -90,6 +90,11 @@ static int mosart_input_mapping(struct h
case 0xff000000:
/* ignore HID features */
return -1;
+
+ case HID_UP_BUTTON:
+ /* ignore buttons */
+ return -1;
+
}
return 0;
@@ -230,6 +235,19 @@ static int mosart_probe(struct hid_devic
return ret;
}
+#ifdef CONFIG_PM
+static int mosart_reset_resume(struct hid_device *hdev)
+{
+ struct hid_report_enum *re = hdev->report_enum
+ + HID_FEATURE_REPORT;
+ struct hid_report *r = re->report_id_hash[7];
+
+ r->field[0]->value[0] = 0x02;
+ usbhid_submit_report(hdev, r, USB_DIR_OUT);
+ return 0;
+}
+#endif
+
static void mosart_remove(struct hid_device *hdev)
{
hid_hw_stop(hdev);
@@ -257,6 +275,9 @@ static struct hid_driver mosart_driver =
.input_mapped = mosart_input_mapped,
.usage_table = mosart_grabbed_usages,
.event = mosart_event,
+#ifdef CONFIG_PM
+ .reset_resume = mosart_reset_resume,
+#endif
};
static int __init mosart_init(void)
Follow ups