diff mbox series

Input: goodix - Add upside-down quirk for Teclast X89 tablet

Message ID 20191202085636.6650-1-hdegoede@redhat.com (mailing list archive)
State Mainlined
Commit df5b5e555b356662a5e4a23c6774fdfce8547d54
Headers show
Series Input: goodix - Add upside-down quirk for Teclast X89 tablet | expand

Commit Message

Hans de Goede Dec. 2, 2019, 8:56 a.m. UTC
The touchscreen on the Teclast X89 is mounted upside down in relation to
the display orientation (the touchscreen itself is mounted upright, but the
display is mounted upside-down). Add a quirk for this so that we send
coordinates which match the display orientation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/input/touchscreen/goodix.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Bastien Nocera Dec. 2, 2019, 10:16 a.m. UTC | #1
On Mon, 2019-12-02 at 09:56 +0100, Hans de Goede wrote:
> The touchscreen on the Teclast X89 is mounted upside down in relation
> to
> the display orientation (the touchscreen itself is mounted upright,
> but the
> display is mounted upside-down). Add a quirk for this so that we send
> coordinates which match the display orientation.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Looks good

Reviewed-by: Bastien Nocera <hadess@hadess.net>

> ---
>  drivers/input/touchscreen/goodix.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/goodix.c
> b/drivers/input/touchscreen/goodix.c
> index fb43aa708660..0403102e807e 100644
> --- a/drivers/input/touchscreen/goodix.c
> +++ b/drivers/input/touchscreen/goodix.c
> @@ -128,6 +128,15 @@ static const unsigned long goodix_irq_flags[] =
> {
>   */
>  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 = "WinBook TW100",
>  		.matches = {
Dmitry Torokhov Dec. 7, 2019, 8:28 p.m. UTC | #2
On Mon, Dec 02, 2019 at 11:16:35AM +0100, Bastien Nocera wrote:
> On Mon, 2019-12-02 at 09:56 +0100, Hans de Goede wrote:
> > The touchscreen on the Teclast X89 is mounted upside down in relation
> > to
> > the display orientation (the touchscreen itself is mounted upright,
> > but the
> > display is mounted upside-down). Add a quirk for this so that we send
> > coordinates which match the display orientation.
> > 
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> Looks good
> 
> Reviewed-by: Bastien Nocera <hadess@hadess.net>

Applied, thank you.

> 
> > ---
> >  drivers/input/touchscreen/goodix.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/drivers/input/touchscreen/goodix.c
> > b/drivers/input/touchscreen/goodix.c
> > index fb43aa708660..0403102e807e 100644
> > --- a/drivers/input/touchscreen/goodix.c
> > +++ b/drivers/input/touchscreen/goodix.c
> > @@ -128,6 +128,15 @@ static const unsigned long goodix_irq_flags[] =
> > {
> >   */
> >  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 = "WinBook TW100",
> >  		.matches = {
>
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index fb43aa708660..0403102e807e 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -128,6 +128,15 @@  static const unsigned long goodix_irq_flags[] = {
  */
 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 = "WinBook TW100",
 		.matches = {