Skip to content

Commit e271f6c

Browse files
jwrdegoedeJiri Kosina
authored andcommitted
HID: asus: Add support for multi-touch touchpad on Medion Akoya E1239T
The multi-touch touchpad found on the Medion Akoya E1239T's keyboard-dock, uses the same custom multi-touch protocol as the Asus keyboard-docks (same chipset vendor, Integrated Technology Express / ITE). Add support for this using the existing multi-touch touchpad support in the hid-asus driver. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent a61f9e4 commit e271f6c

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

drivers/hid/hid-asus.c

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ MODULE_AUTHOR("Frederik Wenigwieser <[email protected]>");
4040
MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
4141

4242
#define T100_TPAD_INTF 2
43+
#define MEDION_E1239T_TPAD_INTF 1
4344

4445
#define T100CHI_MOUSE_REPORT_ID 0x06
4546
#define FEATURE_REPORT_ID 0x0d
@@ -77,6 +78,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
7778
#define QUIRK_G752_KEYBOARD BIT(8)
7879
#define QUIRK_T101HA_DOCK BIT(9)
7980
#define QUIRK_T90CHI BIT(10)
81+
#define QUIRK_MEDION_E1239T BIT(11)
8082

8183
#define I2C_KEYBOARD_QUIRKS (QUIRK_FIX_NOTEBOOK_REPORT | \
8284
QUIRK_NO_INIT_REPORTS | \
@@ -170,6 +172,16 @@ static const struct asus_touchpad_info asus_t100chi_tp = {
170172
.report_size = 15 /* 2 byte header + 3 * 4 + 1 byte footer */,
171173
};
172174

175+
static const struct asus_touchpad_info medion_e1239t_tp = {
176+
.max_x = 2640,
177+
.max_y = 1380,
178+
.res_x = 29, /* units/mm */
179+
.res_y = 28, /* units/mm */
180+
.contact_size = 5,
181+
.max_contacts = 5,
182+
.report_size = 32 /* 2 byte header + 5 * 5 + 5 byte footer */,
183+
};
184+
173185
static void asus_report_contact_down(struct asus_drvdata *drvdat,
174186
int toolType, u8 *data)
175187
{
@@ -877,6 +889,17 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
877889
drvdata->tp = &asus_t100chi_tp;
878890
}
879891

892+
if ((drvdata->quirks & QUIRK_MEDION_E1239T) &&
893+
hid_is_using_ll_driver(hdev, &usb_hid_driver)) {
894+
struct usb_host_interface *alt =
895+
to_usb_interface(hdev->dev.parent)->altsetting;
896+
897+
if (alt->desc.bInterfaceNumber == MEDION_E1239T_TPAD_INTF) {
898+
drvdata->quirks |= QUIRK_SKIP_INPUT_MAPPING;
899+
drvdata->tp = &medion_e1239t_tp;
900+
}
901+
}
902+
880903
if (drvdata->quirks & QUIRK_NO_INIT_REPORTS)
881904
hdev->quirks |= HID_QUIRK_NO_INIT_REPORTS;
882905

@@ -1056,7 +1079,8 @@ static const struct hid_device_id asus_devices[] = {
10561079
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
10571080
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ASUSTEK,
10581081
USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD), QUIRK_T100CHI },
1059-
1082+
{ HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE_MEDION_E1239T),
1083+
QUIRK_MEDION_E1239T },
10601084
{ }
10611085
};
10621086
MODULE_DEVICE_TABLE(hid, asus_devices);

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@
640640
#define I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720 0x837a
641641
#define USB_DEVICE_ID_ITE_LENOVO_YOGA900 0x8396
642642
#define USB_DEVICE_ID_ITE8595 0x8595
643+
#define USB_DEVICE_ID_ITE_MEDION_E1239T 0xce50
643644

644645
#define USB_VENDOR_ID_JABRA 0x0b0e
645646
#define USB_DEVICE_ID_JABRA_SPEAK_410 0x0412

0 commit comments

Comments
 (0)