Skip to content

Commit 46c54cf

Browse files
committed
platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on Estar Beauty HD tablet
The Estar Beauty HD (MID 7316R) tablet uses a Goodix touchscreen, with the X and Y coordinates swapped compared to the LCD panel. Add a touchscreen_dmi entry for this adding a "touchscreen-swapped-x-y" device-property to the i2c-client instantiated for this device before the driver binds. This is the first entry of a Goodix touchscreen to touchscreen_dmi.c, so far DMI quirks for Goodix touchscreen's have been added directly to drivers/input/touchscreen/goodix.c. Currently there are 3 DMI tables in goodix.c: 1. rotated_screen[] for devices where the touchscreen is rotated 180 degrees vs the LCD panel 2. inverted_x_screen[] for devices where the X axis is inverted 3. nine_bytes_report[] for devices which use a non standard touch report size Arguably only 3. really needs to be inside the driver and the other 2 cases are better handled through the generic touchscreen DMI quirk mechanism from touchscreen_dmi.c, which allows adding device-props to any i2c-client. Esp. now that goodix.c is using the generic touchscreen_properties code. Alternative to the approach from this patch we could add a 4th dmi_system_id table for devices with swapped-x-y axis to goodix.c, but that seems undesirable. Cc: Bastien Nocera <[email protected]> Cc: Dmitry Torokhov <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9bba962 commit 46c54cf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/platform/x86/touchscreen_dmi.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,16 @@ static const struct ts_dmi_data digma_citi_e200_data = {
263263
.properties = digma_citi_e200_props,
264264
};
265265

266+
static const struct property_entry estar_beauty_hd_props[] = {
267+
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
268+
{ }
269+
};
270+
271+
static const struct ts_dmi_data estar_beauty_hd_data = {
272+
.acpi_name = "GDIX1001:00",
273+
.properties = estar_beauty_hd_props,
274+
};
275+
266276
static const struct property_entry gp_electronic_t701_props[] = {
267277
PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
268278
PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
@@ -942,6 +952,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
942952
DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
943953
},
944954
},
955+
{
956+
/* Estar Beauty HD (MID 7316R) */
957+
.driver_data = (void *)&estar_beauty_hd_data,
958+
.matches = {
959+
DMI_MATCH(DMI_SYS_VENDOR, "Estar"),
960+
DMI_MATCH(DMI_PRODUCT_NAME, "eSTAR BEAUTY HD Intel Quad core"),
961+
},
962+
},
945963
{
946964
/* GP-electronic T701 */
947965
.driver_data = (void *)&gp_electronic_t701_data,

0 commit comments

Comments
 (0)