]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: Input: atmel_mxt_ts - Disable T9 on mxt_stop
authorBenson Leung <bleung@chromium.org>
Mon, 28 Jan 2013 23:31:26 +0000 (15:31 -0800)
committerBenson Leung <bleung@chromium.org>
Tue, 29 Jan 2013 06:11:25 +0000 (22:11 -0800)
Instead of using 0x81 to keep the object enabled,
disable T9 on mxt_stop by writing 0x00 to it.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17465
TEST=stop powerd (on R25 also stop powerm)
close the lid, or use a magnet to trigger the lid sensor.
cat /sys/kernel/debug/atmel_mxt_ts/2-004a/object
Look for Type: 9, byte 0. Check that this is 0x00
when lid is closed. When opened, this should return
to 0x83.

Change-Id: I87e9e13567bba7c0993e4c1ceec12f98fbe2f8ac
Reviewed-on: https://gerrit.chromium.org/gerrit/42183
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42213
Reviewed-by: Danielle Drew <ddrew@chromium.org>
drivers/input/touchscreen/atmel_mxt_ts.c

index e05235c29ff795ae280857f441cc55db77fa6c14..af9d7956a6448cee7cc15fd1f1c16ae25f4e3489 100644 (file)
                                         MXT_TOUCH_CTRL_RPTEN)
 #define MXT_TOUCH_CTRL_SCANNING                (MXT_TOUCH_CTRL_ENABLE | \
                                         MXT_TOUCH_CTRL_SCANEN)
+#define MXT_TOUCH_CTRL_OFF             0x0
 
 /* MXT_PROCI_GRIPFACE_T20 field */
 #define MXT_GRIPFACE_CTRL      0
@@ -2449,7 +2450,7 @@ static void mxt_stop(struct mxt_data *data)
 {
        /* Disable touch reporting */
        mxt_write_object(data, MXT_TOUCH_MULTI_T9, 0, MXT_TOUCH_CTRL,
-                        MXT_TOUCH_CTRL_SCANNING);
+                        MXT_TOUCH_CTRL_OFF);
 }
 
 static int mxt_input_open(struct input_dev *dev)