Hi, I have a Lenovo T480s with an Elantech one-button trackpad (aka clickpad) but for some reason the kernel is not reporting it as a clickpad. It appears that the module checks the SM version for a bit and reports it as a clickpad if the bit is set, but my trackpad is reporting a SM version of 0, so the flag on L184 here[1] is false. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/tree/drivers/input/mouse/elan_i2c_smbus.c#n168 I am wondering if there is some other flag in some other field that may indicate this is a clickpad. Here is the other information reported by the trackpad: elan_i2c 6-0015: Elan Touchpad: Module ID: 0x0020, Firmware: 0x0001, Sample: 0x0000, IAP: 0x0000 elan_i2c 6-0015: Elan Touchpad Extra Information: Max ABS X,Y: 3052,1888 Width X,Y: 127,125 Resolution X,Y: 31,31 (dots/mm) ic type: 0x20 info pattern: 0x0 This crude patch setting `clickpad = 1` works fine on my T480s. I'm pretty sure there is some way to actually check for a clickpad instead of special-casing this particular module/product ID. diff --git a/elan_i2c_core.c b/elan_i2c_core.c index f5ae248..718cb19 100644 --- a/elan_i2c_core.c +++ b/elan_i2c_core.c @@ -241,6 +241,16 @@ static int elan_check_ASUS_special_fw(struct elan_tp_data *data) return false; } +static void elan_check_clickpad(struct elan_tp_data *data) +{ + if (data->ic_type == 0x20 + && data->product_id == 0x20 + && data->sm_version == 0) { + data->clickpad = 1; + } + return; +} + static int __elan_initialize(struct elan_tp_data *data) { struct i2c_client *client = data->client; @@ -257,6 +267,8 @@ static int __elan_initialize(struct elan_tp_data *data) if (error) return error; + elan_check_clickpad(data); + /* * Some ASUS devices were shipped with firmware that requires * touchpads to be woken up first, before attempting to switch -- Has anyone else run into this issue, or does anyone know anything about this? Thanks. -- Hao Wei