diff options
author | Benson Leung <bleung@chromium.org> | 2013-02-21 15:14:59 -0500 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2013-02-27 08:30:44 -0500 |
commit | 8e1ad4c4bf7b99b495625433a1fcc2b566caa222 (patch) | |
tree | 7aaabf6c42c5f7426f4df9e114a8aa023f949f24 | |
parent | c165b80cfecc5f253e93ebd133f7c53cf81d82d5 (diff) |
Platform: x86: chromeos_laptop - Add Pixel Trackpad
Instantiate the atmel mxt224s trackpad on this system.
The trackpad may appear at two possible addresses:
0x4b in operational mode.
0x25 in bootloader mode.
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
-rw-r--r-- | drivers/platform/x86/chromeos_laptop.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c index bc6599c5bbe4..577e64d9f0ac 100644 --- a/drivers/platform/x86/chromeos_laptop.c +++ b/drivers/platform/x86/chromeos_laptop.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | 27 | ||
28 | #define ATMEL_TP_I2C_ADDR 0x4b | ||
29 | #define ATMEL_TP_I2C_BL_ADDR 0x25 | ||
28 | #define CYAPA_TP_I2C_ADDR 0x67 | 30 | #define CYAPA_TP_I2C_ADDR 0x67 |
29 | #define ISL_ALS_I2C_ADDR 0x44 | 31 | #define ISL_ALS_I2C_ADDR 0x44 |
30 | #define TAOS_ALS_I2C_ADDR 0x29 | 32 | #define TAOS_ALS_I2C_ADDR 0x29 |
@@ -58,6 +60,12 @@ static struct i2c_board_info __initdata tsl2563_als_device = { | |||
58 | I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), | 60 | I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), |
59 | }; | 61 | }; |
60 | 62 | ||
63 | static struct i2c_board_info __initdata atmel_224s_tp_device = { | ||
64 | I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR), | ||
65 | .platform_data = NULL, | ||
66 | .flags = I2C_CLIENT_WAKE, | ||
67 | }; | ||
68 | |||
61 | static struct i2c_client __init *__add_probed_i2c_device( | 69 | static struct i2c_client __init *__add_probed_i2c_device( |
62 | const char *name, | 70 | const char *name, |
63 | int bus, | 71 | int bus, |
@@ -161,6 +169,19 @@ static int __init setup_cyapa_smbus_tp(const struct dmi_system_id *id) | |||
161 | return 0; | 169 | return 0; |
162 | } | 170 | } |
163 | 171 | ||
172 | static int __init setup_atmel_224s_tp(const struct dmi_system_id *id) | ||
173 | { | ||
174 | const unsigned short addr_list[] = { ATMEL_TP_I2C_BL_ADDR, | ||
175 | ATMEL_TP_I2C_ADDR, | ||
176 | I2C_CLIENT_END }; | ||
177 | |||
178 | /* add atmel mxt touchpad on VGA DDC GMBus */ | ||
179 | tp = add_probed_i2c_device("trackpad", I2C_ADAPTER_VGADDC, | ||
180 | &atmel_224s_tp_device, addr_list); | ||
181 | return 0; | ||
182 | } | ||
183 | |||
184 | |||
164 | static int __init setup_isl29018_als(const struct dmi_system_id *id) | 185 | static int __init setup_isl29018_als(const struct dmi_system_id *id) |
165 | { | 186 | { |
166 | /* add isl29018 light sensor */ | 187 | /* add isl29018 light sensor */ |
@@ -192,6 +213,14 @@ static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = { | |||
192 | .callback = setup_cyapa_smbus_tp, | 213 | .callback = setup_cyapa_smbus_tp, |
193 | }, | 214 | }, |
194 | { | 215 | { |
216 | .ident = "Chromebook Pixel - Touchpad", | ||
217 | .matches = { | ||
218 | DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), | ||
219 | DMI_MATCH(DMI_PRODUCT_NAME, "Link"), | ||
220 | }, | ||
221 | .callback = setup_atmel_224s_tp, | ||
222 | }, | ||
223 | { | ||
195 | .ident = "Samsung Series 5 550 - Light Sensor", | 224 | .ident = "Samsung Series 5 550 - Light Sensor", |
196 | .matches = { | 225 | .matches = { |
197 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG"), | 226 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG"), |