Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Platform: x86: chromeos_laptop : Add basic platform data for atmel devices

Add basic platform data to get the current upstream driver working
with the 224s touchpad and 1664s touchscreen.
We will be using NULL config so we will use the settings from the
devices' NVRAMs.

Signed-off-by: Benson Leung <bleung@chromium.org>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Benson Leung and committed by
Linus Torvalds
2ef39204 22dfab7f

+39 -2
+39 -2
drivers/platform/x86/chromeos_laptop.c
··· 23 23 24 24 #include <linux/dmi.h> 25 25 #include <linux/i2c.h> 26 + #include <linux/i2c/atmel_mxt_ts.h> 27 + #include <linux/input.h> 28 + #include <linux/interrupt.h> 26 29 #include <linux/module.h> 27 30 28 31 #define ATMEL_TP_I2C_ADDR 0x4b ··· 70 67 I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), 71 68 }; 72 69 70 + static struct mxt_platform_data atmel_224s_tp_platform_data = { 71 + .x_line = 18, 72 + .y_line = 12, 73 + .x_size = 102*20, 74 + .y_size = 68*20, 75 + .blen = 0x80, /* Gain setting is in upper 4 bits */ 76 + .threshold = 0x32, 77 + .voltage = 0, /* 3.3V */ 78 + .orient = MXT_VERTICAL_FLIP, 79 + .irqflags = IRQF_TRIGGER_FALLING, 80 + .is_tp = true, 81 + .key_map = { KEY_RESERVED, 82 + KEY_RESERVED, 83 + KEY_RESERVED, 84 + BTN_LEFT }, 85 + .config = NULL, 86 + .config_length = 0, 87 + }; 88 + 73 89 static struct i2c_board_info __initdata atmel_224s_tp_device = { 74 90 I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR), 75 - .platform_data = NULL, 91 + .platform_data = &atmel_224s_tp_platform_data, 76 92 .flags = I2C_CLIENT_WAKE, 93 + }; 94 + 95 + static struct mxt_platform_data atmel_1664s_platform_data = { 96 + .x_line = 32, 97 + .y_line = 50, 98 + .x_size = 1700, 99 + .y_size = 2560, 100 + .blen = 0x89, /* Gain setting is in upper 4 bits */ 101 + .threshold = 0x28, 102 + .voltage = 0, /* 3.3V */ 103 + .orient = MXT_ROTATED_90_COUNTER, 104 + .irqflags = IRQF_TRIGGER_FALLING, 105 + .is_tp = false, 106 + .config = NULL, 107 + .config_length = 0, 77 108 }; 78 109 79 110 static struct i2c_board_info __initdata atmel_1664s_device = { 80 111 I2C_BOARD_INFO("atmel_mxt_ts", ATMEL_TS_I2C_ADDR), 81 - .platform_data = NULL, 112 + .platform_data = &atmel_1664s_platform_data, 82 113 .flags = I2C_CLIENT_WAKE, 83 114 }; 84 115