From: Hans de Goede <hdegoede@redhat.com>
To: "Kuppuswamy Sathyanarayanan"
<sathyanarayanan.kuppuswamy@linux.intel.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andy Shevchenko" <andy@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH 1/2] platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names
Date: Mon, 19 Feb 2024 12:42:17 +0100 [thread overview]
Message-ID: <7cdb8c21-71dd-4ead-9fba-d48a37eb9788@redhat.com> (raw)
In-Reply-To: <aaeb4332-e6a3-4e21-880f-69b4bcc42ba5@linux.intel.com>
Hi,
On 2/13/24 02:01, Kuppuswamy Sathyanarayanan wrote:
>
> On 2/12/24 4:06 AM, Hans de Goede 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".
>>
>> Note this drops the length check for I2C_NAME_SIZE. This never was
>> necessary since the ACPI names used are never more then 11 chars and
>> I2C_NAME_SIZE is 20 so the replaced strncmp() would always stop long
>> before reaching I2C_NAME_SIZE.
>>
>> Link: https://linux-hardware.org/?computer=AC4301C0542A
>> Closes: https://github.com/onitake/gsl-firmware/issues/91
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>
> Since this is a bug fix, don't you want to add stable tag?
Good point, done.
I've added these to my review-hans (soon to be fixes) branch now.
Regards,
Hans
>
> Otherwise, it looks good.
>
> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
>
>> drivers/platform/x86/touchscreen_dmi.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
>> index 7aee5e9ff2b8..969477c83e56 100644
>> --- a/drivers/platform/x86/touchscreen_dmi.c
>> +++ b/drivers/platform/x86/touchscreen_dmi.c
>> @@ -81,7 +81,7 @@ static const struct property_entry chuwi_hi8_air_props[] = {
>> };
>>
>> static const struct ts_dmi_data chuwi_hi8_air_data = {
>> - .acpi_name = "MSSL1680:00",
>> + .acpi_name = "MSSL1680",
>> .properties = chuwi_hi8_air_props,
>> };
>>
>> @@ -1821,7 +1821,7 @@ static void ts_dmi_add_props(struct i2c_client *client)
>> int error;
>>
>> if (has_acpi_companion(dev) &&
>> - !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
>> + strstarts(client->name, ts_data->acpi_name)) {
>> error = device_create_managed_software_node(dev, ts_data->properties, NULL);
>> if (error)
>> dev_err(dev, "failed to add properties: %d\n", error);
>
prev parent reply other threads:[~2024-02-19 11:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 12:06 [PATCH 1/2] platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names Hans de Goede
2024-02-12 12:06 ` [PATCH 2/2] platform/x86: touchscreen_dmi: Consolidate Goodix upside-down touchscreen data Hans de Goede
2024-02-13 1:01 ` Kuppuswamy Sathyanarayanan
2024-02-12 12:09 ` [PATCH 1/2] platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names Hans de Goede
2024-02-12 12:36 ` Andy Shevchenko
2024-02-13 1:01 ` Kuppuswamy Sathyanarayanan
2024-02-19 11:42 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7cdb8c21-71dd-4ead-9fba-d48a37eb9788@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox