Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
Input: elantech - fix crc_enabled for Fujitsu H730
Browse files Browse the repository at this point in the history
The Fujitsu H730 does not work with crc_enabled = 0, even though the
crc_enabled bit in the firmware version indicated it would. When switching
this value to crc_enabled to 1, the touchpad works. This patch uses DMI to
detect H730.

Reported-by: Stefan Valouch <[email protected]>
Tested-by: Stefan Valouch <[email protected]>
Tested-by: Alfredo Gemma <[email protected]>
Signed-off-by: Ulrik De Bie <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
ulrikdb authored and dtor committed Nov 8, 2014
1 parent caeb0d3 commit 0dc1587
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion drivers/input/mouse/elantech.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,22 @@ static int elantech_reconnect(struct psmouse *psmouse)
return 0;
}

/*
* Some hw_version 4 models do not work with crc_disabled
*/
static const struct dmi_system_id elantech_dmi_force_crc_enabled[] = {
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
{
/* Fujitsu H730 does not work with crc_enabled == 0 */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H730"),
},
},
#endif
{ }
};

/*
* Some hw_version 3 models go into error state when we try to set
* bit 3 and/or bit 1 of r10.
Expand Down Expand Up @@ -1525,7 +1541,8 @@ static int elantech_set_properties(struct elantech_data *etd)
* The signatures of v3 and v4 packets change depending on the
* value of this hardware flag.
*/
etd->crc_enabled = ((etd->fw_version & 0x4000) == 0x4000);
etd->crc_enabled = (etd->fw_version & 0x4000) == 0x4000 ||
dmi_check_system(elantech_dmi_force_crc_enabled);

/* Enable real hardware resolution on hw_version 3 ? */
etd->set_hw_resolution = !dmi_check_system(no_hw_res_dmi_table);
Expand Down

0 comments on commit 0dc1587

Please sign in to comment.