* [RFC 0/4] Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c @ 2021-05-02 10:09 Hans de Goede 2021-05-02 10:09 ` [RFC 1/4] platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name Hans de Goede ` (3 more replies) 0 siblings, 4 replies; 6+ messages in thread From: Hans de Goede @ 2021-05-02 10:09 UTC (permalink / raw) To: Dmitry Torokhov, Bastien Nocera, Mark Gross, Andy Shevchenko Cc: Hans de Goede, Arkadiy, Sergei A . Trusov, linux-input, platform-driver-x86 Hi Dmitry, Bastien, As discussed before here is a patch series which moves the DMI quirks for upside-down and x-axis-inverted touchscreens in goodix.c to the generic x86 touchscreen mechanism found in drivers/platform/x86/touchscreen_dmi.c . Note this is marked as RFC for now since I have been unable to confirm the ACPI HID for the touchscreen on the Cube I15-TC which is necessary for the touchscreen_dmi.c code. I've send an email to the reporter and the author of the patch adding the quirk for the Cube I15-TC. Since this patch touches files in both the Input and pdx86 subsystems we need to discuss how to merge this. Dmitry I can create an immutable branch which these 4 patches on top of 5.13-rc1 (once released) and then send you a pull-req for that im-branch, would that work for you ? Regards, Hans Hans de Goede (4): platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c Input: goodix - platform/x86: touchscreen_dmi - Move inverted-x quirk to touchscreen_dmi.c platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets drivers/input/touchscreen/goodix.c | 74 ---------- drivers/platform/x86/touchscreen_dmi.c | 184 ++++++++++++++++++------- 2 files changed, 131 insertions(+), 127 deletions(-) -- 2.31.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC 1/4] platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name 2021-05-02 10:09 [RFC 0/4] Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c Hans de Goede @ 2021-05-02 10:09 ` Hans de Goede 2021-05-04 7:30 ` Hans de Goede 2021-05-02 10:09 ` [RFC 2/4] Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c Hans de Goede ` (2 subsequent siblings) 3 siblings, 1 reply; 6+ messages in thread From: Hans de Goede @ 2021-05-02 10:09 UTC (permalink / raw) To: Dmitry Torokhov, Bastien Nocera, Mark Gross, Andy Shevchenko Cc: Hans de Goede, Arkadiy, Sergei A . Trusov, linux-input, platform-driver-x86 The ACPI-companion device's dev_name() (which gets used as i2c_client->name for I2C-devices) consists of the ACPI HID to a ":##" suffix, which typically is ":00" but if there is more then one ACPI fwnode with the same HID it may be ":01" etc. On some tablets there are multiple ACPI fwnode-s describing the touchscreen, one for each I2C bus the device may be connected to. In this case we get ACPI-companion devices with e.g. "GDIX1001:00" and "GDIX1001:01" as dev_name(). This makes matching on the dev_name() as we have been doing inconvinient if we want to share a ts_dmi_data struct between device's which need the same set of device-properties, bit have their touchscreen on different busses leading to different ":##" suffixes. Since there always is only one touchscreen, there is no reason to include the suffix in the matching. Change the code to match on ACPI HID instead of ACPI-companion device's dev_name() so that it is more flexible. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/platform/x86/touchscreen_dmi.c | 106 ++++++++++++------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c index d95f04b61111..4f64a77e1ae8 100644 --- a/drivers/platform/x86/touchscreen_dmi.c +++ b/drivers/platform/x86/touchscreen_dmi.c @@ -20,7 +20,7 @@ struct ts_dmi_data { /* The EFI embedded-fw code expects this to be the first member! */ struct efi_embedded_fw_desc embedded_fw; - const char *acpi_name; + const char *acpi_hid; const struct property_entry *properties; }; @@ -36,7 +36,7 @@ static const struct property_entry chuwi_hi8_props[] = { }; static const struct ts_dmi_data chuwi_hi8_data = { - .acpi_name = "MSSL0001:00", + .acpi_hid = "MSSL0001", .properties = chuwi_hi8_props, }; @@ -50,7 +50,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_hid = "MSSL1680", .properties = chuwi_hi8_air_props, }; @@ -76,7 +76,7 @@ static const struct ts_dmi_data chuwi_hi8_pro_data = { 0x32, 0xd9, 0x03, 0x28, 0x0d, 0x48, 0x9f, 0x92, 0x35, 0x37, 0xf6, 0x8b, 0x2a, 0xe4, 0x73, 0xff }, }, - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = chuwi_hi8_pro_props, }; @@ -95,7 +95,7 @@ static const struct property_entry chuwi_hi10_air_props[] = { }; static const struct ts_dmi_data chuwi_hi10_air_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = chuwi_hi10_air_props, }; @@ -111,7 +111,7 @@ static const struct property_entry chuwi_hi10_plus_props[] = { }; static const struct ts_dmi_data chuwi_hi10_plus_data = { - .acpi_name = "MSSL0017:00", + .acpi_hid = "MSSL0017", .properties = chuwi_hi10_plus_props, }; @@ -128,7 +128,7 @@ static const struct property_entry chuwi_vi8_props[] = { }; static const struct ts_dmi_data chuwi_vi8_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = chuwi_vi8_props, }; @@ -156,7 +156,7 @@ static const struct property_entry chuwi_vi10_props[] = { }; static const struct ts_dmi_data chuwi_vi10_data = { - .acpi_name = "MSSL0002:00", + .acpi_hid = "MSSL0002", .properties = chuwi_vi10_props, }; @@ -172,7 +172,7 @@ static const struct property_entry chuwi_surbook_mini_props[] = { }; static const struct ts_dmi_data chuwi_surbook_mini_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = chuwi_surbook_mini_props, }; @@ -189,7 +189,7 @@ static const struct property_entry connect_tablet9_props[] = { }; static const struct ts_dmi_data connect_tablet9_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = connect_tablet9_props, }; @@ -214,7 +214,7 @@ static const struct ts_dmi_data cube_iwork8_air_data = { 0x96, 0xd4, 0x9f, 0x04, 0xe1, 0x47, 0x25, 0x25, 0x60, 0x77, 0x41, 0x33, 0xeb, 0x12, 0x82, 0xfc }, }, - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = cube_iwork8_air_props, }; @@ -230,7 +230,7 @@ static const struct property_entry cube_knote_i1101_props[] = { }; static const struct ts_dmi_data cube_knote_i1101_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = cube_knote_i1101_props, }; @@ -244,7 +244,7 @@ static const struct property_entry dexp_ursus_7w_props[] = { }; static const struct ts_dmi_data dexp_ursus_7w_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = dexp_ursus_7w_props, }; @@ -259,7 +259,7 @@ static const struct property_entry digma_citi_e200_props[] = { }; static const struct ts_dmi_data digma_citi_e200_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = digma_citi_e200_props, }; @@ -269,7 +269,7 @@ static const struct property_entry estar_beauty_hd_props[] = { }; static const struct ts_dmi_data estar_beauty_hd_data = { - .acpi_name = "GDIX1001:00", + .acpi_hid = "GDIX1001", .properties = estar_beauty_hd_props, }; @@ -281,7 +281,7 @@ static const struct property_entry glavey_tm800a550l_props[] = { }; static const struct ts_dmi_data glavey_tm800a550l_data = { - .acpi_name = "GDIX1001:00", + .acpi_hid = "GDIX1001", .properties = glavey_tm800a550l_props, }; @@ -295,7 +295,7 @@ static const struct property_entry gp_electronic_t701_props[] = { }; static const struct ts_dmi_data gp_electronic_t701_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = gp_electronic_t701_props, }; @@ -313,7 +313,7 @@ static const struct property_entry irbis_tw90_props[] = { }; static const struct ts_dmi_data irbis_tw90_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = irbis_tw90_props, }; @@ -328,7 +328,7 @@ static const struct property_entry irbis_tw118_props[] = { }; static const struct ts_dmi_data irbis_tw118_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = irbis_tw118_props, }; @@ -345,7 +345,7 @@ static const struct property_entry itworks_tw891_props[] = { }; static const struct ts_dmi_data itworks_tw891_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = itworks_tw891_props, }; @@ -359,7 +359,7 @@ static const struct property_entry jumper_ezpad_6_pro_props[] = { }; static const struct ts_dmi_data jumper_ezpad_6_pro_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = jumper_ezpad_6_pro_props, }; @@ -374,7 +374,7 @@ static const struct property_entry jumper_ezpad_6_pro_b_props[] = { }; static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = jumper_ezpad_6_pro_b_props, }; @@ -390,7 +390,7 @@ static const struct property_entry jumper_ezpad_6_m4_props[] = { }; static const struct ts_dmi_data jumper_ezpad_6_m4_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = jumper_ezpad_6_m4_props, }; @@ -407,7 +407,7 @@ static const struct property_entry jumper_ezpad_7_props[] = { }; static const struct ts_dmi_data jumper_ezpad_7_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = jumper_ezpad_7_props, }; @@ -423,7 +423,7 @@ static const struct property_entry jumper_ezpad_mini3_props[] = { }; static const struct ts_dmi_data jumper_ezpad_mini3_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = jumper_ezpad_mini3_props, }; @@ -440,7 +440,7 @@ static const struct property_entry mpman_converter9_props[] = { }; static const struct ts_dmi_data mpman_converter9_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = mpman_converter9_props, }; @@ -457,7 +457,7 @@ static const struct property_entry mpman_mpwin895cl_props[] = { }; static const struct ts_dmi_data mpman_mpwin895cl_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = mpman_mpwin895cl_props, }; @@ -474,7 +474,7 @@ static const struct property_entry myria_my8307_props[] = { }; static const struct ts_dmi_data myria_my8307_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = myria_my8307_props, }; @@ -491,7 +491,7 @@ static const struct property_entry onda_obook_20_plus_props[] = { }; static const struct ts_dmi_data onda_obook_20_plus_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = onda_obook_20_plus_props, }; @@ -517,7 +517,7 @@ static const struct ts_dmi_data onda_v80_plus_v3_data = { 0xcc, 0xe4, 0x70, 0xd6, 0x46, 0x9c, 0xd7, 0xa7, 0x4b, 0x82, 0x3f, 0xab, 0xc7, 0x90, 0xea, 0x23 }, }, - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = onda_v80_plus_v3_props, }; @@ -532,7 +532,7 @@ static const struct property_entry onda_v820w_32g_props[] = { }; static const struct ts_dmi_data onda_v820w_32g_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = onda_v820w_32g_props, }; @@ -550,7 +550,7 @@ static const struct property_entry onda_v891_v5_props[] = { }; static const struct ts_dmi_data onda_v891_v5_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = onda_v891_v5_props, }; @@ -566,7 +566,7 @@ static const struct property_entry onda_v891w_v1_props[] = { }; static const struct ts_dmi_data onda_v891w_v1_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = onda_v891w_v1_props, }; @@ -583,7 +583,7 @@ static const struct property_entry onda_v891w_v3_props[] = { }; static const struct ts_dmi_data onda_v891w_v3_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = onda_v891w_v3_props, }; @@ -606,7 +606,7 @@ static const struct ts_dmi_data pipo_w2s_data = { 0xbb, 0x45, 0x8c, 0x52, 0x27, 0xb7, 0x18, 0xf4, 0x31, 0x00, 0x6a, 0x49, 0x76, 0xd8, 0x7c, 0xd3 }, }, - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = pipo_w2s_props, }; @@ -622,7 +622,7 @@ static const struct property_entry pipo_w11_props[] = { }; static const struct ts_dmi_data pipo_w11_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = pipo_w11_props, }; @@ -639,7 +639,7 @@ static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = { }; static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = pov_mobii_wintab_p800w_v20_props, }; @@ -656,7 +656,7 @@ static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = { }; static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = pov_mobii_wintab_p800w_v21_props, }; @@ -673,7 +673,7 @@ static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = { }; static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = pov_mobii_wintab_p1006w_v10_props, }; @@ -690,7 +690,7 @@ static const struct property_entry predia_basic_props[] = { }; static const struct ts_dmi_data predia_basic_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = predia_basic_props, }; @@ -707,7 +707,7 @@ static const struct property_entry schneider_sct101ctm_props[] = { }; static const struct ts_dmi_data schneider_sct101ctm_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = schneider_sct101ctm_props, }; @@ -723,7 +723,7 @@ static const struct property_entry techbite_arc_11_6_props[] = { }; static const struct ts_dmi_data techbite_arc_11_6_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = techbite_arc_11_6_props, }; @@ -749,7 +749,7 @@ static const struct ts_dmi_data teclast_tbook11_data = { 0xd1, 0x27, 0xb1, 0x65, 0x3c, 0xba, 0xa5, 0x0f, 0xcd, 0xb4, 0xbe, 0x00, 0xbb, 0xf6, 0x43, 0x29 }, }, - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = teclast_tbook11_props, }; @@ -763,7 +763,7 @@ static const struct property_entry teclast_x3_plus_props[] = { }; static const struct ts_dmi_data teclast_x3_plus_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = teclast_x3_plus_props, }; @@ -778,7 +778,7 @@ static const struct property_entry teclast_x98plus2_props[] = { }; static const struct ts_dmi_data teclast_x98plus2_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = teclast_x98plus2_props, }; @@ -793,7 +793,7 @@ static const struct property_entry trekstor_primebook_c11_props[] = { }; static const struct ts_dmi_data trekstor_primebook_c11_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = trekstor_primebook_c11_props, }; @@ -807,7 +807,7 @@ static const struct property_entry trekstor_primebook_c13_props[] = { }; static const struct ts_dmi_data trekstor_primebook_c13_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = trekstor_primebook_c13_props, }; @@ -822,7 +822,7 @@ static const struct property_entry trekstor_primetab_t13b_props[] = { }; static const struct ts_dmi_data trekstor_primetab_t13b_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = trekstor_primetab_t13b_props, }; @@ -839,7 +839,7 @@ static const struct property_entry trekstor_surftab_twin_10_1_props[] = { }; static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = trekstor_surftab_twin_10_1_props, }; @@ -855,7 +855,7 @@ static const struct property_entry trekstor_surftab_wintron70_props[] = { }; static const struct ts_dmi_data trekstor_surftab_wintron70_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = trekstor_surftab_wintron70_props, }; @@ -869,7 +869,7 @@ static const struct property_entry vinga_twizzle_j116_props[] = { }; static const struct ts_dmi_data vinga_twizzle_j116_data = { - .acpi_name = "MSSL1680:00", + .acpi_hid = "MSSL1680", .properties = vinga_twizzle_j116_props, }; @@ -1407,10 +1407,10 @@ static const struct ts_dmi_data *ts_data; static void ts_dmi_add_props(struct i2c_client *client) { struct device *dev = &client->dev; + struct acpi_device *adev = ACPI_COMPANION(dev); int error; - if (has_acpi_companion(dev) && - !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) { + if (adev && !strcmp(acpi_device_hid(adev), ts_data->acpi_hid)) { error = device_create_managed_software_node(dev, ts_data->properties, NULL); if (error) dev_err(dev, "failed to add properties: %d\n", error); -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC 1/4] platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name 2021-05-02 10:09 ` [RFC 1/4] platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name Hans de Goede @ 2021-05-04 7:30 ` Hans de Goede 0 siblings, 0 replies; 6+ messages in thread From: Hans de Goede @ 2021-05-04 7:30 UTC (permalink / raw) To: Dmitry Torokhov, Bastien Nocera, Mark Gross, Andy Shevchenko Cc: Arkadiy, Sergei A . Trusov, linux-input, platform-driver-x86 Hi, On 5/2/21 12:09 PM, Hans de Goede wrote: > The ACPI-companion device's dev_name() (which gets used as > i2c_client->name for I2C-devices) consists of the ACPI HID to a ":##" > suffix, which typically is ":00" but if there is more then one ACPI > fwnode with the same HID it may be ":01" etc. > > On some tablets there are multiple ACPI fwnode-s describing the > touchscreen, one for each I2C bus the device may be connected to. > In this case we get ACPI-companion devices with e.g. "GDIX1001:00" > and "GDIX1001:01" as dev_name(). This makes matching on the dev_name() > as we have been doing inconvinient if we want to share a ts_dmi_data > struct between device's which need the same set of device-properties, > bit have their touchscreen on different busses leading to different > ":##" suffixes. > > Since there always is only one touchscreen, there is no reason to > include the suffix in the matching. > > Change the code to match on ACPI HID instead of ACPI-companion device's > dev_name() so that it is more flexible. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> Self NACK I thought this was a good idea, but I forgot that every kernel devel-cycle a few new quirks get added to touchscreen_dmi.c and that those are typically backported to the stable series. This patch would make all this a big hassle for a tiny gain, so lets I'm dropping it. Regards, Hans > --- > drivers/platform/x86/touchscreen_dmi.c | 106 ++++++++++++------------- > 1 file changed, 53 insertions(+), 53 deletions(-) > > diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c > index d95f04b61111..4f64a77e1ae8 100644 > --- a/drivers/platform/x86/touchscreen_dmi.c > +++ b/drivers/platform/x86/touchscreen_dmi.c > @@ -20,7 +20,7 @@ > struct ts_dmi_data { > /* The EFI embedded-fw code expects this to be the first member! */ > struct efi_embedded_fw_desc embedded_fw; > - const char *acpi_name; > + const char *acpi_hid; > const struct property_entry *properties; > }; > > @@ -36,7 +36,7 @@ static const struct property_entry chuwi_hi8_props[] = { > }; > > static const struct ts_dmi_data chuwi_hi8_data = { > - .acpi_name = "MSSL0001:00", > + .acpi_hid = "MSSL0001", > .properties = chuwi_hi8_props, > }; > > @@ -50,7 +50,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_hid = "MSSL1680", > .properties = chuwi_hi8_air_props, > }; > > @@ -76,7 +76,7 @@ static const struct ts_dmi_data chuwi_hi8_pro_data = { > 0x32, 0xd9, 0x03, 0x28, 0x0d, 0x48, 0x9f, 0x92, > 0x35, 0x37, 0xf6, 0x8b, 0x2a, 0xe4, 0x73, 0xff }, > }, > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = chuwi_hi8_pro_props, > }; > > @@ -95,7 +95,7 @@ static const struct property_entry chuwi_hi10_air_props[] = { > }; > > static const struct ts_dmi_data chuwi_hi10_air_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = chuwi_hi10_air_props, > }; > > @@ -111,7 +111,7 @@ static const struct property_entry chuwi_hi10_plus_props[] = { > }; > > static const struct ts_dmi_data chuwi_hi10_plus_data = { > - .acpi_name = "MSSL0017:00", > + .acpi_hid = "MSSL0017", > .properties = chuwi_hi10_plus_props, > }; > > @@ -128,7 +128,7 @@ static const struct property_entry chuwi_vi8_props[] = { > }; > > static const struct ts_dmi_data chuwi_vi8_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = chuwi_vi8_props, > }; > > @@ -156,7 +156,7 @@ static const struct property_entry chuwi_vi10_props[] = { > }; > > static const struct ts_dmi_data chuwi_vi10_data = { > - .acpi_name = "MSSL0002:00", > + .acpi_hid = "MSSL0002", > .properties = chuwi_vi10_props, > }; > > @@ -172,7 +172,7 @@ static const struct property_entry chuwi_surbook_mini_props[] = { > }; > > static const struct ts_dmi_data chuwi_surbook_mini_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = chuwi_surbook_mini_props, > }; > > @@ -189,7 +189,7 @@ static const struct property_entry connect_tablet9_props[] = { > }; > > static const struct ts_dmi_data connect_tablet9_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = connect_tablet9_props, > }; > > @@ -214,7 +214,7 @@ static const struct ts_dmi_data cube_iwork8_air_data = { > 0x96, 0xd4, 0x9f, 0x04, 0xe1, 0x47, 0x25, 0x25, > 0x60, 0x77, 0x41, 0x33, 0xeb, 0x12, 0x82, 0xfc }, > }, > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = cube_iwork8_air_props, > }; > > @@ -230,7 +230,7 @@ static const struct property_entry cube_knote_i1101_props[] = { > }; > > static const struct ts_dmi_data cube_knote_i1101_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = cube_knote_i1101_props, > }; > > @@ -244,7 +244,7 @@ static const struct property_entry dexp_ursus_7w_props[] = { > }; > > static const struct ts_dmi_data dexp_ursus_7w_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = dexp_ursus_7w_props, > }; > > @@ -259,7 +259,7 @@ static const struct property_entry digma_citi_e200_props[] = { > }; > > static const struct ts_dmi_data digma_citi_e200_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = digma_citi_e200_props, > }; > > @@ -269,7 +269,7 @@ static const struct property_entry estar_beauty_hd_props[] = { > }; > > static const struct ts_dmi_data estar_beauty_hd_data = { > - .acpi_name = "GDIX1001:00", > + .acpi_hid = "GDIX1001", > .properties = estar_beauty_hd_props, > }; > > @@ -281,7 +281,7 @@ static const struct property_entry glavey_tm800a550l_props[] = { > }; > > static const struct ts_dmi_data glavey_tm800a550l_data = { > - .acpi_name = "GDIX1001:00", > + .acpi_hid = "GDIX1001", > .properties = glavey_tm800a550l_props, > }; > > @@ -295,7 +295,7 @@ static const struct property_entry gp_electronic_t701_props[] = { > }; > > static const struct ts_dmi_data gp_electronic_t701_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = gp_electronic_t701_props, > }; > > @@ -313,7 +313,7 @@ static const struct property_entry irbis_tw90_props[] = { > }; > > static const struct ts_dmi_data irbis_tw90_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = irbis_tw90_props, > }; > > @@ -328,7 +328,7 @@ static const struct property_entry irbis_tw118_props[] = { > }; > > static const struct ts_dmi_data irbis_tw118_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = irbis_tw118_props, > }; > > @@ -345,7 +345,7 @@ static const struct property_entry itworks_tw891_props[] = { > }; > > static const struct ts_dmi_data itworks_tw891_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = itworks_tw891_props, > }; > > @@ -359,7 +359,7 @@ static const struct property_entry jumper_ezpad_6_pro_props[] = { > }; > > static const struct ts_dmi_data jumper_ezpad_6_pro_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = jumper_ezpad_6_pro_props, > }; > > @@ -374,7 +374,7 @@ static const struct property_entry jumper_ezpad_6_pro_b_props[] = { > }; > > static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = jumper_ezpad_6_pro_b_props, > }; > > @@ -390,7 +390,7 @@ static const struct property_entry jumper_ezpad_6_m4_props[] = { > }; > > static const struct ts_dmi_data jumper_ezpad_6_m4_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = jumper_ezpad_6_m4_props, > }; > > @@ -407,7 +407,7 @@ static const struct property_entry jumper_ezpad_7_props[] = { > }; > > static const struct ts_dmi_data jumper_ezpad_7_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = jumper_ezpad_7_props, > }; > > @@ -423,7 +423,7 @@ static const struct property_entry jumper_ezpad_mini3_props[] = { > }; > > static const struct ts_dmi_data jumper_ezpad_mini3_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = jumper_ezpad_mini3_props, > }; > > @@ -440,7 +440,7 @@ static const struct property_entry mpman_converter9_props[] = { > }; > > static const struct ts_dmi_data mpman_converter9_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = mpman_converter9_props, > }; > > @@ -457,7 +457,7 @@ static const struct property_entry mpman_mpwin895cl_props[] = { > }; > > static const struct ts_dmi_data mpman_mpwin895cl_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = mpman_mpwin895cl_props, > }; > > @@ -474,7 +474,7 @@ static const struct property_entry myria_my8307_props[] = { > }; > > static const struct ts_dmi_data myria_my8307_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = myria_my8307_props, > }; > > @@ -491,7 +491,7 @@ static const struct property_entry onda_obook_20_plus_props[] = { > }; > > static const struct ts_dmi_data onda_obook_20_plus_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = onda_obook_20_plus_props, > }; > > @@ -517,7 +517,7 @@ static const struct ts_dmi_data onda_v80_plus_v3_data = { > 0xcc, 0xe4, 0x70, 0xd6, 0x46, 0x9c, 0xd7, 0xa7, > 0x4b, 0x82, 0x3f, 0xab, 0xc7, 0x90, 0xea, 0x23 }, > }, > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = onda_v80_plus_v3_props, > }; > > @@ -532,7 +532,7 @@ static const struct property_entry onda_v820w_32g_props[] = { > }; > > static const struct ts_dmi_data onda_v820w_32g_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = onda_v820w_32g_props, > }; > > @@ -550,7 +550,7 @@ static const struct property_entry onda_v891_v5_props[] = { > }; > > static const struct ts_dmi_data onda_v891_v5_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = onda_v891_v5_props, > }; > > @@ -566,7 +566,7 @@ static const struct property_entry onda_v891w_v1_props[] = { > }; > > static const struct ts_dmi_data onda_v891w_v1_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = onda_v891w_v1_props, > }; > > @@ -583,7 +583,7 @@ static const struct property_entry onda_v891w_v3_props[] = { > }; > > static const struct ts_dmi_data onda_v891w_v3_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = onda_v891w_v3_props, > }; > > @@ -606,7 +606,7 @@ static const struct ts_dmi_data pipo_w2s_data = { > 0xbb, 0x45, 0x8c, 0x52, 0x27, 0xb7, 0x18, 0xf4, > 0x31, 0x00, 0x6a, 0x49, 0x76, 0xd8, 0x7c, 0xd3 }, > }, > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = pipo_w2s_props, > }; > > @@ -622,7 +622,7 @@ static const struct property_entry pipo_w11_props[] = { > }; > > static const struct ts_dmi_data pipo_w11_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = pipo_w11_props, > }; > > @@ -639,7 +639,7 @@ static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = { > }; > > static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = pov_mobii_wintab_p800w_v20_props, > }; > > @@ -656,7 +656,7 @@ static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = { > }; > > static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = pov_mobii_wintab_p800w_v21_props, > }; > > @@ -673,7 +673,7 @@ static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = { > }; > > static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = pov_mobii_wintab_p1006w_v10_props, > }; > > @@ -690,7 +690,7 @@ static const struct property_entry predia_basic_props[] = { > }; > > static const struct ts_dmi_data predia_basic_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = predia_basic_props, > }; > > @@ -707,7 +707,7 @@ static const struct property_entry schneider_sct101ctm_props[] = { > }; > > static const struct ts_dmi_data schneider_sct101ctm_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = schneider_sct101ctm_props, > }; > > @@ -723,7 +723,7 @@ static const struct property_entry techbite_arc_11_6_props[] = { > }; > > static const struct ts_dmi_data techbite_arc_11_6_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = techbite_arc_11_6_props, > }; > > @@ -749,7 +749,7 @@ static const struct ts_dmi_data teclast_tbook11_data = { > 0xd1, 0x27, 0xb1, 0x65, 0x3c, 0xba, 0xa5, 0x0f, > 0xcd, 0xb4, 0xbe, 0x00, 0xbb, 0xf6, 0x43, 0x29 }, > }, > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = teclast_tbook11_props, > }; > > @@ -763,7 +763,7 @@ static const struct property_entry teclast_x3_plus_props[] = { > }; > > static const struct ts_dmi_data teclast_x3_plus_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = teclast_x3_plus_props, > }; > > @@ -778,7 +778,7 @@ static const struct property_entry teclast_x98plus2_props[] = { > }; > > static const struct ts_dmi_data teclast_x98plus2_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = teclast_x98plus2_props, > }; > > @@ -793,7 +793,7 @@ static const struct property_entry trekstor_primebook_c11_props[] = { > }; > > static const struct ts_dmi_data trekstor_primebook_c11_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = trekstor_primebook_c11_props, > }; > > @@ -807,7 +807,7 @@ static const struct property_entry trekstor_primebook_c13_props[] = { > }; > > static const struct ts_dmi_data trekstor_primebook_c13_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = trekstor_primebook_c13_props, > }; > > @@ -822,7 +822,7 @@ static const struct property_entry trekstor_primetab_t13b_props[] = { > }; > > static const struct ts_dmi_data trekstor_primetab_t13b_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = trekstor_primetab_t13b_props, > }; > > @@ -839,7 +839,7 @@ static const struct property_entry trekstor_surftab_twin_10_1_props[] = { > }; > > static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = trekstor_surftab_twin_10_1_props, > }; > > @@ -855,7 +855,7 @@ static const struct property_entry trekstor_surftab_wintron70_props[] = { > }; > > static const struct ts_dmi_data trekstor_surftab_wintron70_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = trekstor_surftab_wintron70_props, > }; > > @@ -869,7 +869,7 @@ static const struct property_entry vinga_twizzle_j116_props[] = { > }; > > static const struct ts_dmi_data vinga_twizzle_j116_data = { > - .acpi_name = "MSSL1680:00", > + .acpi_hid = "MSSL1680", > .properties = vinga_twizzle_j116_props, > }; > > @@ -1407,10 +1407,10 @@ static const struct ts_dmi_data *ts_data; > static void ts_dmi_add_props(struct i2c_client *client) > { > struct device *dev = &client->dev; > + struct acpi_device *adev = ACPI_COMPANION(dev); > int error; > > - if (has_acpi_companion(dev) && > - !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) { > + if (adev && !strcmp(acpi_device_hid(adev), ts_data->acpi_hid)) { > error = device_create_managed_software_node(dev, ts_data->properties, NULL); > if (error) > dev_err(dev, "failed to add properties: %d\n", error); > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC 2/4] Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c 2021-05-02 10:09 [RFC 0/4] Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c Hans de Goede 2021-05-02 10:09 ` [RFC 1/4] platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name Hans de Goede @ 2021-05-02 10:09 ` Hans de Goede 2021-05-02 10:09 ` [RFC 3/4] Input: goodix - platform/x86: touchscreen_dmi - Move inverted-x quirk " Hans de Goede 2021-05-02 10:09 ` [RFC 4/4] platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets Hans de Goede 3 siblings, 0 replies; 6+ messages in thread From: Hans de Goede @ 2021-05-02 10:09 UTC (permalink / raw) To: Dmitry Torokhov, Bastien Nocera, Mark Gross, Andy Shevchenko Cc: Hans de Goede, Arkadiy, Sergei A . Trusov, linux-input, platform-driver-x86 Move the DMI quirks for upside-down mounted Goodix touchscreens from drivers/input/touchscreen/goodix.c to drivers/platform/x86/touchscreen_dmi.c, where all the other x86 touchscreen quirks live. Note the touchscreen_dmi.c code attaches standard touchscreen device-properties to an i2c-client device based on a combination of a DMI match + a device-name match. I've verified that the: Teclast X98 Pro, WinBook TW100 and WinBook TW700 uses an ACPI devicename of "GDIX1001:00" based on acpidumps and/or dmesg output available on the web. This patch was tested on a Teclast X89 tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/input/touchscreen/goodix.c | 52 -------------------------- drivers/platform/x86/touchscreen_dmi.c | 51 +++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 52 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index e743709b55f0..d92f6b2b6dcf 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -118,51 +118,6 @@ static const unsigned long goodix_irq_flags[] = { IRQ_TYPE_LEVEL_HIGH, }; -/* - * Those tablets have their coordinates origin at the bottom right - * of the tablet, as if rotated 180 degrees - */ -static const struct dmi_system_id rotated_screen[] = { -#if defined(CONFIG_DMI) && defined(CONFIG_X86) - { - .ident = "Teclast X89", - .matches = { - /* tPAD is too generic, also match on bios date */ - DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"), - DMI_MATCH(DMI_BOARD_NAME, "tPAD"), - DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"), - }, - }, - { - .ident = "Teclast X98 Pro", - .matches = { - /* - * Only match BIOS date, because the manufacturers - * BIOS does not report the board name at all - * (sometimes)... - */ - DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"), - DMI_MATCH(DMI_BIOS_DATE, "10/28/2015"), - }, - }, - { - .ident = "WinBook TW100", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "WinBook"), - DMI_MATCH(DMI_PRODUCT_NAME, "TW100") - } - }, - { - .ident = "WinBook TW700", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "WinBook"), - DMI_MATCH(DMI_PRODUCT_NAME, "TW700") - }, - }, -#endif - {} -}; - static const struct dmi_system_id nine_bytes_report[] = { #if defined(CONFIG_DMI) && defined(CONFIG_X86) { @@ -1086,13 +1041,6 @@ static int goodix_configure_dev(struct goodix_ts_data *ts) ABS_MT_POSITION_Y, ts->prop.max_y); } - if (dmi_check_system(rotated_screen)) { - ts->prop.invert_x = true; - ts->prop.invert_y = true; - dev_dbg(&ts->client->dev, - "Applying '180 degrees rotated screen' quirk\n"); - } - if (dmi_check_system(nine_bytes_report)) { ts->contact_size = 9; diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c index 4f64a77e1ae8..bb47cea8d297 100644 --- a/drivers/platform/x86/touchscreen_dmi.c +++ b/drivers/platform/x86/touchscreen_dmi.c @@ -285,6 +285,18 @@ static const struct ts_dmi_data glavey_tm800a550l_data = { .properties = glavey_tm800a550l_props, }; +/* Generic props + data for upside-down mounted GDIX1001 touchscreens */ +static const struct property_entry gdix1001_upside_down_props[] = { + PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), + PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), + { } +}; + +static const struct ts_dmi_data gdix1001_upside_down_data = { + .acpi_hid = "GDIX1001", + .properties = gdix1001_upside_down_props, +}; + static const struct property_entry gp_electronic_t701_props[] = { PROPERTY_ENTRY_U32("touchscreen-size-x", 960), PROPERTY_ENTRY_U32("touchscreen-size-y", 640), @@ -1308,6 +1320,16 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"), }, }, + { + /* Teclast X89 (Windows version / BIOS) */ + .driver_data = (void *)&gdix1001_upside_down_data, + .matches = { + /* tPAD is too generic, also match on bios date */ + DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"), + DMI_MATCH(DMI_BOARD_NAME, "tPAD"), + DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"), + }, + }, { /* Teclast X98 Plus II */ .driver_data = (void *)&teclast_x98plus2_data, @@ -1316,6 +1338,19 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"), }, }, + { + /* Teclast X98 Pro */ + .driver_data = (void *)&gdix1001_upside_down_data, + .matches = { + /* + * Only match BIOS date, because the manufacturers + * BIOS does not report the board name at all + * (sometimes)... + */ + DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"), + DMI_MATCH(DMI_BIOS_DATE, "10/28/2015"), + }, + }, { /* Trekstor Primebook C11 */ .driver_data = (void *)&trekstor_primebook_c11_data, @@ -1391,6 +1426,22 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "VINGA Twizzle J116"), }, }, + { + /* "WinBook TW100" */ + .driver_data = (void *)&gdix1001_upside_down_data, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "WinBook"), + DMI_MATCH(DMI_PRODUCT_NAME, "TW100") + } + }, + { + /* WinBook TW700 */ + .driver_data = (void *)&gdix1001_upside_down_data, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "WinBook"), + DMI_MATCH(DMI_PRODUCT_NAME, "TW700") + }, + }, { /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */ .driver_data = (void *)&chuwi_vi8_data, -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RFC 3/4] Input: goodix - platform/x86: touchscreen_dmi - Move inverted-x quirk to touchscreen_dmi.c 2021-05-02 10:09 [RFC 0/4] Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c Hans de Goede 2021-05-02 10:09 ` [RFC 1/4] platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name Hans de Goede 2021-05-02 10:09 ` [RFC 2/4] Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c Hans de Goede @ 2021-05-02 10:09 ` Hans de Goede 2021-05-02 10:09 ` [RFC 4/4] platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets Hans de Goede 3 siblings, 0 replies; 6+ messages in thread From: Hans de Goede @ 2021-05-02 10:09 UTC (permalink / raw) To: Dmitry Torokhov, Bastien Nocera, Mark Gross, Andy Shevchenko Cc: Hans de Goede, Arkadiy, Sergei A . Trusov, linux-input, platform-driver-x86 Move the DMI quirk for the Goodix touchscreen with inverted X coordinates found on the Cube I15-TC tablet from drivers/input/touchscreen/goodix.c to drivers/platform/x86/touchscreen_dmi.c, where all the other x86 touchscreen quirks live. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/input/touchscreen/goodix.c | 22 ---------------------- drivers/platform/x86/touchscreen_dmi.c | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index d92f6b2b6dcf..2203ad4d8e30 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -131,22 +131,6 @@ static const struct dmi_system_id nine_bytes_report[] = { {} }; -/* - * Those tablets have their x coordinate inverted - */ -static const struct dmi_system_id inverted_x_screen[] = { -#if defined(CONFIG_DMI) && defined(CONFIG_X86) - { - .ident = "Cube I15-TC", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Cube"), - DMI_MATCH(DMI_PRODUCT_NAME, "I15-TC") - }, - }, -#endif - {} -}; - /** * goodix_i2c_read - read data from a register of the i2c slave device. * @@ -1048,12 +1032,6 @@ static int goodix_configure_dev(struct goodix_ts_data *ts) "Non-standard 9-bytes report format quirk\n"); } - if (dmi_check_system(inverted_x_screen)) { - ts->prop.invert_x = true; - dev_dbg(&ts->client->dev, - "Applying 'inverted x screen' quirk\n"); - } - error = input_mt_init_slots(ts->input_dev, ts->max_touch_num, INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); if (error) { diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c index bb47cea8d297..60876d8962b6 100644 --- a/drivers/platform/x86/touchscreen_dmi.c +++ b/drivers/platform/x86/touchscreen_dmi.c @@ -218,6 +218,17 @@ static const struct ts_dmi_data cube_iwork8_air_data = { .properties = cube_iwork8_air_props, }; +static const struct property_entry cube_iwork10_ultimate_i15_tc_props[] = { + PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), + { } +}; + +static const struct ts_dmi_data cube_iwork10_ultimate_i15_tc_data = { + .acpi_hid = "GDIX1001", + .properties = cube_iwork10_ultimate_i15_tc_props, +}; + + static const struct property_entry cube_knote_i1101_props[] = { PROPERTY_ENTRY_U32("touchscreen-min-x", 20), PROPERTY_ENTRY_U32("touchscreen-min-y", 22), @@ -992,6 +1003,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), }, }, + { + /* CUBE iWork10 Ultimate (I15-TC) */ + .driver_data = (void *)&cube_iwork10_ultimate_i15_tc_data, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Cube"), + DMI_MATCH(DMI_PRODUCT_NAME, "I15-TC") + }, + }, { /* Cube KNote i1101 */ .driver_data = (void *)&cube_knote_i1101_data, -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RFC 4/4] platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets 2021-05-02 10:09 [RFC 0/4] Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c Hans de Goede ` (2 preceding siblings ...) 2021-05-02 10:09 ` [RFC 3/4] Input: goodix - platform/x86: touchscreen_dmi - Move inverted-x quirk " Hans de Goede @ 2021-05-02 10:09 ` Hans de Goede 3 siblings, 0 replies; 6+ messages in thread From: Hans de Goede @ 2021-05-02 10:09 UTC (permalink / raw) To: Dmitry Torokhov, Bastien Nocera, Mark Gross, Andy Shevchenko Cc: Hans de Goede, Arkadiy, Sergei A . Trusov, linux-input, platform-driver-x86 Teclast X89 tablets come in 2 versions, with Windows pre-installed and with Android pre-installed. These 2 versions have different DMI strings. Add a match for the DMI strings used by the Android version BIOS. Note the Android version BIOS has a bug in the DSDT where no IRQ is provided, so for the touchscreen to work a DSDT override fixing this is necessary as well. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/platform/x86/touchscreen_dmi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c index 60876d8962b6..a1e4af5a8ce8 100644 --- a/drivers/platform/x86/touchscreen_dmi.c +++ b/drivers/platform/x86/touchscreen_dmi.c @@ -1339,6 +1339,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"), }, }, + { + /* Teclast X89 (Android version / BIOS) */ + .driver_data = (void *)&gdix1001_upside_down_data, + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "WISKY"), + DMI_MATCH(DMI_BOARD_NAME, "3G062i"), + }, + }, { /* Teclast X89 (Windows version / BIOS) */ .driver_data = (void *)&gdix1001_upside_down_data, -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-04 7:30 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-05-02 10:09 [RFC 0/4] Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c Hans de Goede 2021-05-02 10:09 ` [RFC 1/4] platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name Hans de Goede 2021-05-04 7:30 ` Hans de Goede 2021-05-02 10:09 ` [RFC 2/4] Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c Hans de Goede 2021-05-02 10:09 ` [RFC 3/4] Input: goodix - platform/x86: touchscreen_dmi - Move inverted-x quirk " Hans de Goede 2021-05-02 10:09 ` [RFC 4/4] platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets Hans de Goede
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).