aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2011-03-15 00:41:34 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-03-15 00:42:06 -0400
commit979a72dad9c6649486e35a84324af8e81936af03 (patch)
tree23a6ee2c0a16aa53583f153406b67f329642426d /drivers/input
parente7cbb90ad244b9d3ba5c6d57aec05d6c73df0a98 (diff)
Input: atmel_mxt_ts - remove firmware version check
Atmel touchscreen chips have different firmware version with each chip, so we cannot distinguish attribute of chip by firmware version. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 6264ba80c38c..0986fa46e9df 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -60,11 +60,11 @@
60#define MXT_PROCG_NOISE 22 60#define MXT_PROCG_NOISE 22
61#define MXT_PROCI_ONETOUCH 24 61#define MXT_PROCI_ONETOUCH 24
62#define MXT_PROCI_TWOTOUCH 27 62#define MXT_PROCI_TWOTOUCH 27
63#define MXT_SPT_COMMSCONFIG 18 /* firmware ver 21 over */ 63#define MXT_SPT_COMMSCONFIG 18
64#define MXT_SPT_GPIOPWM 19 64#define MXT_SPT_GPIOPWM 19
65#define MXT_SPT_SELFTEST 25 65#define MXT_SPT_SELFTEST 25
66#define MXT_SPT_CTECONFIG 28 66#define MXT_SPT_CTECONFIG 28
67#define MXT_SPT_USERDATA 38 /* firmware ver 21 over */ 67#define MXT_SPT_USERDATA 38
68 68
69/* MXT_GEN_COMMAND field */ 69/* MXT_GEN_COMMAND field */
70#define MXT_COMMAND_RESET 0 70#define MXT_COMMAND_RESET 0
@@ -115,7 +115,7 @@
115#define MXT_TOUCH_XEDGEDIST 27 115#define MXT_TOUCH_XEDGEDIST 27
116#define MXT_TOUCH_YEDGECTRL 28 116#define MXT_TOUCH_YEDGECTRL 28
117#define MXT_TOUCH_YEDGEDIST 29 117#define MXT_TOUCH_YEDGEDIST 29
118#define MXT_TOUCH_JUMPLIMIT 30 /* firmware ver 22 over */ 118#define MXT_TOUCH_JUMPLIMIT 30
119 119
120/* MXT_PROCI_GRIPFACE field */ 120/* MXT_PROCI_GRIPFACE field */
121#define MXT_GRIPFACE_CTRL 0 121#define MXT_GRIPFACE_CTRL 0
@@ -157,7 +157,7 @@
157#define MXT_CTE_MODE 2 157#define MXT_CTE_MODE 2
158#define MXT_CTE_IDLEGCAFDEPTH 3 158#define MXT_CTE_IDLEGCAFDEPTH 3
159#define MXT_CTE_ACTVGCAFDEPTH 4 159#define MXT_CTE_ACTVGCAFDEPTH 4
160#define MXT_CTE_VOLTAGE 5 /* firmware ver 21 over */ 160#define MXT_CTE_VOLTAGE 5
161 161
162#define MXT_VOLTAGE_DEFAULT 2700000 162#define MXT_VOLTAGE_DEFAULT 2700000
163#define MXT_VOLTAGE_STEP 10000 163#define MXT_VOLTAGE_STEP 10000
@@ -686,7 +686,7 @@ static void mxt_handle_pdata(struct mxt_data *data)
686 MXT_TOUCH_YRANGE_MSB, (pdata->y_size - 1) >> 8); 686 MXT_TOUCH_YRANGE_MSB, (pdata->y_size - 1) >> 8);
687 687
688 /* Set touchscreen voltage */ 688 /* Set touchscreen voltage */
689 if (data->info.version >= MXT_VER_21 && pdata->voltage) { 689 if (pdata->voltage) {
690 if (pdata->voltage < MXT_VOLTAGE_DEFAULT) { 690 if (pdata->voltage < MXT_VOLTAGE_DEFAULT) {
691 voltage = (MXT_VOLTAGE_DEFAULT - pdata->voltage) / 691 voltage = (MXT_VOLTAGE_DEFAULT - pdata->voltage) /
692 MXT_VOLTAGE_STEP; 692 MXT_VOLTAGE_STEP;
@@ -951,19 +951,8 @@ static ssize_t mxt_update_fw_store(struct device *dev,
951 const char *buf, size_t count) 951 const char *buf, size_t count)
952{ 952{
953 struct mxt_data *data = dev_get_drvdata(dev); 953 struct mxt_data *data = dev_get_drvdata(dev);
954 unsigned int version;
955 int error; 954 int error;
956 955
957 if (sscanf(buf, "%u", &version) != 1) {
958 dev_err(dev, "Invalid values\n");
959 return -EINVAL;
960 }
961
962 if (data->info.version < MXT_VER_21 || version < MXT_VER_21) {
963 dev_err(dev, "FW update supported starting with version 21\n");
964 return -EINVAL;
965 }
966
967 disable_irq(data->irq); 956 disable_irq(data->irq);
968 957
969 error = mxt_load_fw(dev, MXT_FW_NAME); 958 error = mxt_load_fw(dev, MXT_FW_NAME);