aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-03-20 18:31:36 -0400
committerBenson Leung <bleung@chromium.org>2018-04-10 01:51:22 -0400
commitf00c1d199e05f4f633a3ae34f16f707257d56fcf (patch)
tree6cc576c6fdec77bd5e0edea2ce874b3fcfb24932
parente6215eeaa23c5d80a72caa91fc80795b9cde038f (diff)
platform/chrome: chromeos_laptop - use device properties for Pixel
Now that Atmel driver uses generic device properties we can use them instead of platform data when setting up touchpad on the original Google Pixel. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Benson Leung <bleung@chromium.org>
-rw-r--r--drivers/platform/chrome/chromeos_laptop.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index 1191c1a3a0cd..fe83a2a4900e 100644
--- a/drivers/platform/chrome/chromeos_laptop.c
+++ b/drivers/platform/chrome/chromeos_laptop.c
@@ -8,13 +8,13 @@
8 8
9#include <linux/dmi.h> 9#include <linux/dmi.h>
10#include <linux/i2c.h> 10#include <linux/i2c.h>
11#include <linux/platform_data/atmel_mxt_ts.h>
12#include <linux/input.h> 11#include <linux/input.h>
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
14#include <linux/ioport.h> 13#include <linux/ioport.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/pci.h> 15#include <linux/pci.h>
17#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/property.h>
18 18
19#define ATMEL_TP_I2C_ADDR 0x4b 19#define ATMEL_TP_I2C_ADDR 0x4b
20#define ATMEL_TP_I2C_BL_ADDR 0x25 20#define ATMEL_TP_I2C_BL_ADDR 0x25
@@ -229,9 +229,9 @@ static int chromebook_pixel_tp_keys[] = {
229 BTN_LEFT 229 BTN_LEFT
230}; 230};
231 231
232static struct mxt_platform_data chromebook_pixel_tp_platform_data = { 232static const struct property_entry chromebook_pixel_trackpad_props[] = {
233 .t19_num_keys = ARRAY_SIZE(chromebook_pixel_tp_keys), 233 PROPERTY_ENTRY_U32_ARRAY("linux,gpio-keymap", chromebook_pixel_tp_keys),
234 .t19_keymap = chromebook_pixel_tp_keys, 234 { }
235}; 235};
236 236
237static struct chromeos_laptop chromebook_pixel = { 237static struct chromeos_laptop chromebook_pixel = {
@@ -253,8 +253,8 @@ static struct chromeos_laptop chromebook_pixel = {
253 .board_info = { 253 .board_info = {
254 I2C_BOARD_INFO("atmel_mxt_tp", 254 I2C_BOARD_INFO("atmel_mxt_tp",
255 ATMEL_TP_I2C_ADDR), 255 ATMEL_TP_I2C_ADDR),
256 .platform_data = 256 .properties =
257 &chromebook_pixel_tp_platform_data, 257 chromebook_pixel_trackpad_props,
258 .flags = I2C_CLIENT_WAKE, 258 .flags = I2C_CLIENT_WAKE,
259 }, 259 },
260 .dmi_name = "trackpad", 260 .dmi_name = "trackpad",