diff mbox series

platform/x86: touchscreen_dmi: Add info for the Predia Basic tablet

Message ID 20201015194949.50566-1-hdegoede@redhat.com (mailing list archive)
State Accepted, archived
Headers show
Series platform/x86: touchscreen_dmi: Add info for the Predia Basic tablet | expand

Commit Message

Hans de Goede Oct. 15, 2020, 7:49 p.m. UTC
Add touchscreen info for the Predia Basic tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Andy Shevchenko Oct. 15, 2020, 8:25 p.m. UTC | #1
On Thu, Oct 15, 2020 at 10:50 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Add touchscreen info for the Predia Basic tablet.

Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
> index dda60f89c951..26cbf7cc8129 100644
> --- a/drivers/platform/x86/touchscreen_dmi.c
> +++ b/drivers/platform/x86/touchscreen_dmi.c
> @@ -623,6 +623,23 @@ static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
>         .properties     = pov_mobii_wintab_p1006w_v10_props,
>  };
>
> +static const struct property_entry predia_basic_props[] = {
> +       PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
> +       PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
> +       PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
> +       PROPERTY_ENTRY_U32("touchscreen-size-y", 1144),
> +       PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
> +       PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-predia-basic.fw"),
> +       PROPERTY_ENTRY_U32("silead,max-fingers", 10),
> +       PROPERTY_ENTRY_BOOL("silead,home-button"),
> +       { }
> +};
> +
> +static const struct ts_dmi_data predia_basic_data = {
> +       .acpi_name      = "MSSL1680:00",
> +       .properties     = predia_basic_props,
> +};
> +
>  static const struct property_entry schneider_sct101ctm_props[] = {
>         PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
>         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
> @@ -1109,6 +1126,16 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
>                         DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
>                 },
>         },
> +       {
> +               /* Predia Basic tablet) */
> +               .driver_data = (void *)&predia_basic_data,
> +               .matches = {
> +                       DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
> +                       DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
> +                       /* Above matches are too generic, add bios-version match */
> +                       DMI_MATCH(DMI_BIOS_VERSION, "Mx.WT107.KUBNGEA"),
> +               },
> +       },
>         {
>                 /* Point of View mobii wintab p800w (v2.1) */
>                 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
> --
> 2.28.0
>
diff mbox series

Patch

diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index dda60f89c951..26cbf7cc8129 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -623,6 +623,23 @@  static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
 	.properties	= pov_mobii_wintab_p1006w_v10_props,
 };
 
+static const struct property_entry predia_basic_props[] = {
+	PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
+	PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
+	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
+	PROPERTY_ENTRY_U32("touchscreen-size-y", 1144),
+	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
+	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-predia-basic.fw"),
+	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+	PROPERTY_ENTRY_BOOL("silead,home-button"),
+	{ }
+};
+
+static const struct ts_dmi_data predia_basic_data = {
+	.acpi_name	= "MSSL1680:00",
+	.properties	= predia_basic_props,
+};
+
 static const struct property_entry schneider_sct101ctm_props[] = {
 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
@@ -1109,6 +1126,16 @@  const struct dmi_system_id touchscreen_dmi_table[] = {
 			DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
 		},
 	},
+	{
+		/* Predia Basic tablet) */
+		.driver_data = (void *)&predia_basic_data,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
+			/* Above matches are too generic, add bios-version match */
+			DMI_MATCH(DMI_BIOS_VERSION, "Mx.WT107.KUBNGEA"),
+		},
+	},
 	{
 		/* Point of View mobii wintab p800w (v2.1) */
 		.driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,