]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ACPI: PNP: compare the string length in the matching_id()
authorHui Wang <hui.wang@canonical.com>
Fri, 11 Dec 2020 02:18:14 +0000 (10:18 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:26:17 +0000 (14:26 +0100)
commit54a5b17fa803cf47d0a7553af51c8d9111164a07
tree60db728a71a584b5d607d2476362ae55e67ab22f
parent4922799f45dc38829611e90d138c1650fd9b6595
ACPI: PNP: compare the string length in the matching_id()

BugLink: https://bugs.launchpad.net/bugs/1910822
commit b08221c40febcbda9309dd70c61cf1b0ebb0e351 upstream.

Recently we met a touchscreen problem on some Thinkpad machines, the
touchscreen driver (i2c-hid) is not loaded and the touchscreen can't
work.

An i2c ACPI device with the name WACF2200 is defined in the BIOS, with
the current rule in matching_id(), this device will be regarded as
a PNP device since there is WACFXXX in the acpi_pnp_device_ids[] and
this PNP device is attached to the acpi device as the 1st
physical_node, this will make the i2c bus match fail when i2c bus
calls acpi_companion_match() to match the acpi_id_table in the i2c-hid
driver.

WACF2200 is an i2c device instead of a PNP device, after adding the
string length comparing, the matching_id() will return false when
matching WACF2200 and WACFXXX, and it is reasonable to compare the
string length when matching two IDs.

Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/acpi/acpi_pnp.c