Attachment '0001-Input-goodix-add-changes-to-support-PIPO-X8.patch'

Download

   1 From 508714a599982b11a22180c17cd7ca4ec4193873 Mon Sep 17 00:00:00 2001
   2 From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernhardu@vr-web.de>
   3 Date: Mon, 14 Mar 2016 14:59:55 +0100
   4 Subject: Input: goodix - add changes to support PIPO X8.
   5 MIME-Version: 1.0
   6 Content-Type: text/plain; charset=UTF-8
   7 Content-Transfer-Encoding: 8bit
   8 
   9 Signed-off-by: Bernhard Übelacker <bernhardu@vr-web.de>
  10 ---
  11  drivers/input/touchscreen/goodix.c | 28 ++++++++++++++++++++++++++--
  12  1 file changed, 26 insertions(+), 2 deletions(-)
  13 
  14 diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
  15 index 240b16f..c5377e1 100644
  16 --- a/drivers/input/touchscreen/goodix.c
  17 +++ b/drivers/input/touchscreen/goodix.c
  18 @@ -107,6 +107,22 @@ static const struct dmi_system_id rotated_screen[] = {
  19  	{}
  20  };
  21  
  22 +/*
  23 + * This is for the device PIPO X8
  24 + */
  25 +static const struct dmi_system_id pipo_x8_screen[] = {
  26 +#if defined(CONFIG_DMI) && defined(CONFIG_X86)
  27 +	{
  28 +		.ident = "PIPO X8",
  29 +		.matches = {
  30 +			DMI_MATCH(DMI_BIOS_VERSION, "X8"),
  31 +			DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB")
  32 +		}
  33 +	},
  34 +#endif
  35 +	{}
  36 +};
  37 +
  38  /**
  39   * goodix_i2c_read - read data from a register of the i2c slave device.
  40   *
  41 @@ -235,9 +251,9 @@ static void goodix_ts_report_touch(struct goodix_ts_data *ts, u8 *coor_data)
  42  
  43  	/* Inversions have to happen before axis swapping */
  44  	if (ts->inverted_x)
  45 -		input_x = ts->abs_x_max - input_x;
  46 +		input_x = (ts->swapped_x_y == false ? ts->abs_x_max : ts->abs_y_max) - input_x;
  47  	if (ts->inverted_y)
  48 -		input_y = ts->abs_y_max - input_y;
  49 +		input_y = (ts->swapped_x_y == false ? ts->abs_y_max : ts->abs_x_max) - input_y;
  50  	if (ts->swapped_x_y)
  51  		swap(input_x, input_y);
  52  
  53 @@ -521,6 +537,14 @@ static void goodix_read_config(struct goodix_ts_data *ts)
  54  		dev_dbg(&ts->client->dev,
  55  			 "Applying '180 degrees rotated screen' quirk\n");
  56  	}
  57 +
  58 +	if (dmi_check_system(pipo_x8_screen)) {
  59 +		ts->inverted_x = true;
  60 +		ts->swapped_x_y = true;
  61 +		swap(ts->abs_x_max, ts->abs_y_max);
  62 +		dev_err(&ts->client->dev,
  63 +			 "Applying 'PIPO X8' quirk\n");
  64 +	}
  65  }
  66  
  67  /**
  68 -- 
  69 2.1.4

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2016-03-14 14:01:10, 2.0 KB) [[attachment:0001-Input-goodix-add-changes-to-support-PIPO-X8.patch]]
  • [get | view] (2016-03-15 13:21:53, 34.3 KB) [[attachment:amixer.txt]]
  • [get | view] (2016-03-14 16:37:33, 37.2 KB) [[attachment:efi-ia32-booted_dsdt.dsl.gz]]
  • [get | view] (2016-03-14 16:37:49, 38.0 KB) [[attachment:efi-x86_64-booted_dsdt.dsl.gz]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.