aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/chromeos_laptop.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
index 93d66809355a..3e5b4497a1d0 100644
--- a/drivers/platform/x86/chromeos_laptop.c
+++ b/drivers/platform/x86/chromeos_laptop.c
@@ -23,6 +23,9 @@
23 23
24#include <linux/dmi.h> 24#include <linux/dmi.h>
25#include <linux/i2c.h> 25#include <linux/i2c.h>
26#include <linux/i2c/atmel_mxt_ts.h>
27#include <linux/input.h>
28#include <linux/interrupt.h>
26#include <linux/module.h> 29#include <linux/module.h>
27 30
28#define ATMEL_TP_I2C_ADDR 0x4b 31#define ATMEL_TP_I2C_ADDR 0x4b
@@ -67,15 +70,49 @@ static struct i2c_board_info __initdata tsl2563_als_device = {
67 I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), 70 I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR),
68}; 71};
69 72
73static struct mxt_platform_data atmel_224s_tp_platform_data = {
74 .x_line = 18,
75 .y_line = 12,
76 .x_size = 102*20,
77 .y_size = 68*20,
78 .blen = 0x80, /* Gain setting is in upper 4 bits */
79 .threshold = 0x32,
80 .voltage = 0, /* 3.3V */
81 .orient = MXT_VERTICAL_FLIP,
82 .irqflags = IRQF_TRIGGER_FALLING,
83 .is_tp = true,
84 .key_map = { KEY_RESERVED,
85 KEY_RESERVED,
86 KEY_RESERVED,
87 BTN_LEFT },
88 .config = NULL,
89 .config_length = 0,
90};
91
70static struct i2c_board_info __initdata atmel_224s_tp_device = { 92static struct i2c_board_info __initdata atmel_224s_tp_device = {
71 I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR), 93 I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR),
72 .platform_data = NULL, 94 .platform_data = &atmel_224s_tp_platform_data,
73 .flags = I2C_CLIENT_WAKE, 95 .flags = I2C_CLIENT_WAKE,
74}; 96};
75 97
98static struct mxt_platform_data atmel_1664s_platform_data = {
99 .x_line = 32,
100 .y_line = 50,
101 .x_size = 1700,
102 .y_size = 2560,
103 .blen = 0x89, /* Gain setting is in upper 4 bits */
104 .threshold = 0x28,
105 .voltage = 0, /* 3.3V */
106 .orient = MXT_ROTATED_90_COUNTER,
107 .irqflags = IRQF_TRIGGER_FALLING,
108 .is_tp = false,
109 .config = NULL,
110 .config_length = 0,
111};
112
76static struct i2c_board_info __initdata atmel_1664s_device = { 113static struct i2c_board_info __initdata atmel_1664s_device = {
77 I2C_BOARD_INFO("atmel_mxt_ts", ATMEL_TS_I2C_ADDR), 114 I2C_BOARD_INFO("atmel_mxt_ts", ATMEL_TS_I2C_ADDR),
78 .platform_data = NULL, 115 .platform_data = &atmel_1664s_platform_data,
79 .flags = I2C_CLIENT_WAKE, 116 .flags = I2C_CLIENT_WAKE,
80}; 117};
81 118