From 7839cd234ebb2bcf16d6c5ca4278b55c5ddd2900 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Wed, 22 Aug 2012 10:32:31 -0700 Subject: touch: atmel_mxt_ts: Add dynamic config file name Change-Id: Iaaf2352159418c25b4377eb1bf164cbc79e03b32 Signed-off-by: Robert Collins Reviewed-on: http://git-master/r/131490 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Xiaohui Tao Tested-by: Xiaohui Tao Reviewed-by: Dan Willemsen GVS: Gerrit_Virtual_Submit Rebase-Id: Rf2e4fcb399966d18c5a86a66dae5419b90981e6a --- drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++-- include/linux/i2c/atmel_mxt_ts.h | 3 +++ 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 * * 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 */ -- cgit v1.2.3