aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorNick Dyer <nick.dyer@itdev.co.uk>2014-05-19 02:22:04 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-05-26 22:08:23 -0400
commitf3889ed1d4710d36082c5a96e8901bc57cbe7f1f (patch)
tree76e9210f491a35b4f29c48d6396dc61011aa3ad0 /drivers/input
parentfea9e4675d995e6251eecc4368e726580221bcc7 (diff)
Input: atmel_mxt_ts - rename touchscreen defines to include T9
This avoids confusion with the newer T100 touchscreen object. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Acked-by: Benson Leung <bleung@chromium.org> Acked-by: Yufeng Shen <miletus@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 7efb288c31ed..7951d9bcee4a 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -103,13 +103,23 @@
103#define MXT_T9_ORIENT 9 103#define MXT_T9_ORIENT 9
104#define MXT_T9_RANGE 18 104#define MXT_T9_RANGE 18
105 105
106/* MXT_TOUCH_MULTI_T9 status */
107#define MXT_T9_UNGRIP (1 << 0)
108#define MXT_T9_SUPPRESS (1 << 1)
109#define MXT_T9_AMP (1 << 2)
110#define MXT_T9_VECTOR (1 << 3)
111#define MXT_T9_MOVE (1 << 4)
112#define MXT_T9_RELEASE (1 << 5)
113#define MXT_T9_PRESS (1 << 6)
114#define MXT_T9_DETECT (1 << 7)
115
106struct t9_range { 116struct t9_range {
107 u16 x; 117 u16 x;
108 u16 y; 118 u16 y;
109} __packed; 119} __packed;
110 120
111/* Touch orient bits */ 121/* MXT_TOUCH_MULTI_T9 orient */
112#define MXT_XY_SWITCH (1 << 0) 122#define MXT_T9_ORIENT_SWITCH (1 << 0)
113 123
114/* MXT_PROCI_GRIPFACE_T20 field */ 124/* MXT_PROCI_GRIPFACE_T20 field */
115#define MXT_GRIPFACE_CTRL 0 125#define MXT_GRIPFACE_CTRL 0
@@ -184,16 +194,6 @@ struct t9_range {
184#define MXT_BOOT_EXTENDED_ID (1 << 5) 194#define MXT_BOOT_EXTENDED_ID (1 << 5)
185#define MXT_BOOT_ID_MASK 0x1f 195#define MXT_BOOT_ID_MASK 0x1f
186 196
187/* Touch status */
188#define MXT_UNGRIP (1 << 0)
189#define MXT_SUPPRESS (1 << 1)
190#define MXT_AMP (1 << 2)
191#define MXT_VECTOR (1 << 3)
192#define MXT_MOVE (1 << 4)
193#define MXT_RELEASE (1 << 5)
194#define MXT_PRESS (1 << 6)
195#define MXT_DETECT (1 << 7)
196
197/* Touchscreen absolute values */ 197/* Touchscreen absolute values */
198#define MXT_MAX_AREA 0xff 198#define MXT_MAX_AREA 0xff
199 199
@@ -678,21 +678,21 @@ static void mxt_input_touchevent(struct mxt_data *data,
678 dev_dbg(dev, 678 dev_dbg(dev,
679 "[%u] %c%c%c%c%c%c%c%c x: %5u y: %5u area: %3u amp: %3u\n", 679 "[%u] %c%c%c%c%c%c%c%c x: %5u y: %5u area: %3u amp: %3u\n",
680 id, 680 id,
681 (status & MXT_DETECT) ? 'D' : '.', 681 (status & MXT_T9_DETECT) ? 'D' : '.',
682 (status & MXT_PRESS) ? 'P' : '.', 682 (status & MXT_T9_PRESS) ? 'P' : '.',
683 (status & MXT_RELEASE) ? 'R' : '.', 683 (status & MXT_T9_RELEASE) ? 'R' : '.',
684 (status & MXT_MOVE) ? 'M' : '.', 684 (status & MXT_T9_MOVE) ? 'M' : '.',
685 (status & MXT_VECTOR) ? 'V' : '.', 685 (status & MXT_T9_VECTOR) ? 'V' : '.',
686 (status & MXT_AMP) ? 'A' : '.', 686 (status & MXT_T9_AMP) ? 'A' : '.',
687 (status & MXT_SUPPRESS) ? 'S' : '.', 687 (status & MXT_T9_SUPPRESS) ? 'S' : '.',
688 (status & MXT_UNGRIP) ? 'U' : '.', 688 (status & MXT_T9_UNGRIP) ? 'U' : '.',
689 x, y, area, amplitude); 689 x, y, area, amplitude);
690 690
691 input_mt_slot(input_dev, id); 691 input_mt_slot(input_dev, id);
692 input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, 692 input_mt_report_slot_state(input_dev, MT_TOOL_FINGER,
693 status & MXT_DETECT); 693 status & MXT_T9_DETECT);
694 694
695 if (status & MXT_DETECT) { 695 if (status & MXT_T9_DETECT) {
696 input_report_abs(input_dev, ABS_MT_POSITION_X, x); 696 input_report_abs(input_dev, ABS_MT_POSITION_X, x);
697 input_report_abs(input_dev, ABS_MT_POSITION_Y, y); 697 input_report_abs(input_dev, ABS_MT_POSITION_Y, y);
698 input_report_abs(input_dev, ABS_MT_PRESSURE, amplitude); 698 input_report_abs(input_dev, ABS_MT_PRESSURE, amplitude);
@@ -1036,7 +1036,7 @@ static int mxt_read_t9_resolution(struct mxt_data *data)
1036 if (range.y == 0) 1036 if (range.y == 0)
1037 range.y = 1023; 1037 range.y = 1023;
1038 1038
1039 if (orient & MXT_XY_SWITCH) { 1039 if (orient & MXT_T9_ORIENT_SWITCH) {
1040 data->max_x = range.y; 1040 data->max_x = range.y;
1041 data->max_y = range.x; 1041 data->max_y = range.x;
1042 } else { 1042 } else {