Input: elantech - enable SMBus on new (2018+) systems
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Mon, 22 Jul 2019 07:56:55 +0000 (10:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:12:40 +0000 (10:12 +0200)
commit3d180fe5cd7625b67e0879ffa1f6ae1f09385485
tree6fe61450f7ecf0be818d8dc3c27d56e940c71020
parentce7d4fe4e52bf60bff9e70e977f3ead097a8854b
Input: elantech - enable SMBus on new (2018+) systems

commit 883a2a80f79ca5c0c105605fafabd1f3df99b34c upstream.

There are some new HP laptops with Elantech touchpad that don't support
multitouch.

Currently we use ETP_NEW_IC_SMBUS_HOST_NOTIFY() to check if SMBus is supported,
but in addition to firmware version, the bus type also informs us whether the IC
can support SMBus. To avoid breaking old ICs, we will only enable SMbus support
based the bus type on systems manufactured after 2018.

Lastly, let's consolidate all checks into elantech_use_host_notify() and use it
to determine whether to use PS/2 or SMBus.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/mouse/elantech.c