|
@@ -563,6 +563,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse)
|
|
|
} else {
|
|
|
input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
|
|
|
input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
|
|
|
+ input_report_key(dev, BTN_MIDDLE, packet[0] & 0x04);
|
|
|
}
|
|
|
|
|
|
input_mt_report_pointer_emulation(dev, true);
|
|
@@ -1131,6 +1132,22 @@ static void elantech_set_buttonpad_prop(struct psmouse *psmouse)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * Some hw_version 4 models do have a middle button
|
|
|
+ */
|
|
|
+static const struct dmi_system_id elantech_dmi_has_middle_button[] = {
|
|
|
+#if defined(CONFIG_DMI) && defined(CONFIG_X86)
|
|
|
+ {
|
|
|
+ /* Fujitsu H730 has a middle button */
|
|
|
+ .matches = {
|
|
|
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
|
|
|
+ DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H730"),
|
|
|
+ },
|
|
|
+ },
|
|
|
+#endif
|
|
|
+ { }
|
|
|
+};
|
|
|
+
|
|
|
/*
|
|
|
* Set the appropriate event bits for the input subsystem
|
|
|
*/
|
|
@@ -1150,6 +1167,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)
|
|
|
__clear_bit(EV_REL, dev->evbit);
|
|
|
|
|
|
__set_bit(BTN_LEFT, dev->keybit);
|
|
|
+ if (dmi_check_system(elantech_dmi_has_middle_button))
|
|
|
+ __set_bit(BTN_MIDDLE, dev->keybit);
|
|
|
__set_bit(BTN_RIGHT, dev->keybit);
|
|
|
|
|
|
__set_bit(BTN_TOUCH, dev->keybit);
|