summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/elan_i2c.h
diff options
context:
space:
mode:
authorCharlie Mooney <charliemooney@chromium.org>2015-06-09 01:48:23 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-06-09 02:12:25 +0200
commit7b9f1830745cb3ad9e0f3774e83900610cedd39c (patch)
treee7fb5b43a30524e2c05261df219da205125cc0fd /drivers/input/mouse/elan_i2c.h
parentInput: elan_i2c - add support for multi IC type and iap format (diff)
downloadlinux-7b9f1830745cb3ad9e0f3774e83900610cedd39c.tar.xz
linux-7b9f1830745cb3ad9e0f3774e83900610cedd39c.zip
Input: elan_i2c - add product IDs FW names
Previously the elan_i2c touchpad driver would simply request the firmware "/lib/firmware/elan_i2c.bin", which does not work well if there are multiple such devices in the system. Let's append the "product ID" (by using the same function as the sysfs interface for consistency) to the filename. This results in filenames of the form "/lib/firmware/elan_i2c_72.0.bin", allowing you to support multiple elan_i2c touchpads on the same device by simply naming each device's FW with its corresponding product ID. This way when you trigger a fw update the driver will load the correct binary. Signed-off-by: Charlie Mooney <charliemooney@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/elan_i2c.h')
-rw-r--r--drivers/input/mouse/elan_i2c.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/mouse/elan_i2c.h b/drivers/input/mouse/elan_i2c.h
index ff622a1b0c2c..73670f2aebfd 100644
--- a/drivers/input/mouse/elan_i2c.h
+++ b/drivers/input/mouse/elan_i2c.h
@@ -28,7 +28,8 @@
#define ETP_PRESSURE_OFFSET 25
/* IAP Firmware handling */
-#define ETP_FW_NAME "elan_i2c.bin"
+#define ETP_PRODUCT_ID_FORMAT_STRING "%d.0"
+#define ETP_FW_NAME "elan_i2c_" ETP_PRODUCT_ID_FORMAT_STRING ".bin"
#define ETP_IAP_START_ADDR 0x0083
#define ETP_FW_IAP_PAGE_ERR (1 << 5)
#define ETP_FW_IAP_INTF_ERR (1 << 4)