aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorCharlie Mooney <charliemooney@chromium.org>2015-12-15 14:32:10 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-12-15 14:35:55 -0500
commit3eab4588c958205451fd80dfd219955c5e91c18b (patch)
tree1d8d58e04d81025840980fd6f41a622b12bd39ea /drivers/input/mouse
parentfd18ab89166ab004d40f417ae1d6f5dfeecff8ee (diff)
Input: elan_i2c - set input device's vendor and product IDs
Previously the "vendor" and "product" IDs for the elan_i2c driver simply reported 0000. This patch modifies the elan_i2c driver to include the Elan vendor ID and the touchpad's product id under input/input*/{vendor,product}. Specifically, this is to allow us to apply a generic Elan gestures config that will apply to all Elan touchpads on ChromeOS. These configs match to input devices in various ways, but one major way is by matching on vendor ID. Adding this patch allows the default Elan touchpad config to be applied to Elan touchpads in this kernel by matching on devices that have vendor ID 04f3. Note that product ID is also available via custom sysfs entry "product_id" as well. Signed-off-by: Charlie Mooney <charliemooney@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/elan_i2c_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index 5e1665bbaa0b..2f589857a039 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -41,6 +41,7 @@
41 41
42#define DRIVER_NAME "elan_i2c" 42#define DRIVER_NAME "elan_i2c"
43#define ELAN_DRIVER_VERSION "1.6.1" 43#define ELAN_DRIVER_VERSION "1.6.1"
44#define ELAN_VENDOR_ID 0x04f3
44#define ETP_MAX_PRESSURE 255 45#define ETP_MAX_PRESSURE 255
45#define ETP_FWIDTH_REDUCE 90 46#define ETP_FWIDTH_REDUCE 90
46#define ETP_FINGER_WIDTH 15 47#define ETP_FINGER_WIDTH 15
@@ -914,6 +915,8 @@ static int elan_setup_input_device(struct elan_tp_data *data)
914 915
915 input->name = "Elan Touchpad"; 916 input->name = "Elan Touchpad";
916 input->id.bustype = BUS_I2C; 917 input->id.bustype = BUS_I2C;
918 input->id.vendor = ELAN_VENDOR_ID;
919 input->id.product = data->product_id;
917 input_set_drvdata(input, data); 920 input_set_drvdata(input, data);
918 921
919 error = input_mt_init_slots(input, ETP_MAX_FINGERS, 922 error = input_mt_init_slots(input, ETP_MAX_FINGERS,