summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Collins <rcollins@nvidia.com>2012-08-22 10:32:31 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 12:38:41 -0700
commit7839cd234ebb2bcf16d6c5ca4278b55c5ddd2900 (patch)
tree744b7913b6d2b252a5172413afac2dadfff734ed
parent618ca350e5bde473a59eaed51021276a15a17c63 (diff)
touch: atmel_mxt_ts: Add dynamic config file name
Change-Id: Iaaf2352159418c25b4377eb1bf164cbc79e03b32 Signed-off-by: Robert Collins <rcollins@nvidia.com> Reviewed-on: http://git-master/r/131490 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Xiaohui Tao <xtao@nvidia.com> Tested-by: Xiaohui Tao <xtao@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com> GVS: Gerrit_Virtual_Submit Rebase-Id: Rf2e4fcb399966d18c5a86a66dae5419b90981e6a
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c4
-rw-r--r--include/linux/i2c/atmel_mxt_ts.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index ac5740c4435c..ed35c1df0718 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -3,6 +3,7 @@
*
* Copyright (C) 2010 Samsung Electronics Co.Ltd
* Copyright (C) 2011 Atmel Corporation
+ * Copyright (C) 2011-2012 NVIDIA Corporation
* Author: Joonyoung Shim <jy0922.shim@samsung.com>
*
* This program is free software; you can redistribute it and/or modify it
@@ -32,7 +33,6 @@
/* Firmware files */
#define MXT_FW_NAME "maxtouch.fw"
-#define MXT_CFG_NAME "maxtouch.cfg"
#define MXT_CFG_MAGIC "OBP_RAW V1"
/* Registers */
@@ -1497,7 +1497,7 @@ static int mxt_check_reg_init(struct mxt_data *data)
int ret;
u8 command_register;
- ret = mxt_download_config(data, MXT_CFG_NAME);
+ ret = mxt_download_config(data, data->pdata->mxt_cfg_name);
if (ret < 0)
return ret;
else if (ret == 0)
diff --git a/include/linux/i2c/atmel_mxt_ts.h b/include/linux/i2c/atmel_mxt_ts.h
index 51071aa27487..3bc188e27ce7 100644
--- a/include/linux/i2c/atmel_mxt_ts.h
+++ b/include/linux/i2c/atmel_mxt_ts.h
@@ -28,6 +28,8 @@
#define MXT_ROTATED_180 0x6
#define MXT_DIAGONAL_COUNTER 0x7
+#define CFG_NAME_SIZE 64
+
/* The platform data for the Atmel maXTouch touchscreen driver */
struct mxt_platform_data {
unsigned long irqflags;
@@ -35,6 +37,7 @@ struct mxt_platform_data {
const unsigned int key_map[MXT_NUM_GPIO];
u8(*read_chg) (void);
const char *input_name;
+ char mxt_cfg_name[CFG_NAME_SIZE];
};
#endif /* __LINUX_ATMEL_MXT_TS_H */