touch: atmel_mxt_ts: Add dynamic config file name
Robert Collins [Wed, 22 Aug 2012 17:32:31 +0000 (10:32 -0700)]
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

drivers/input/touchscreen/atmel_mxt_ts.c
include/linux/i2c/atmel_mxt_ts.h

index f29a8b5..885a4fa 100644 (file)
@@ -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)
index 7bb0bca..c3938b9 100644 (file)
 #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;
        u8(*read_chg) (void);
        const char *input_name;
+       char mxt_cfg_name[CFG_NAME_SIZE];
 };
 
 #endif /* __LINUX_ATMEL_MXT_TS_H */