On Mon, Feb 12, 2024 at 2:06 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > > On some devices the ACPI name of the touchscreen is e.g. either > MSSL1680:00 or MSSL1680:01 depending on the BIOS version. > > This happens for example on the "Chuwi Hi8 Air" tablet where the initial > commit's ts_data uses "MSSL1680:00" but the tablets from the github issue > and linux-hardware.org probe linked below both use "MSSL1680:01". > > Replace the strcmp() match on ts_data->acpi_name with a strstarts() > check to allow using a partial match on just the ACPI HID of "MSSL1680" > and change the ts_data->acpi_name for the "Chuwi Hi8 Air" accordingly > to fix the touchscreen not working on models where it is "MSSL1680:01". This is a good example to show why we shouldn't rely on device instances and be stuck with HID. Ideally I would prefer to see the acpi_dev_get_first_match_dev() / for_each_acpi_dev_match(). -- With Best Regards, Andy Shevchenko