Input: atmel_mxt_ts - use deep sleep mode when stopped
authorNick Dyer <nick.dyer@itdev.co.uk>
Tue, 4 Aug 2015 23:36:29 +0000 (16:36 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 5 Aug 2015 00:03:52 +0000 (17:03 -0700)
commit7f3884f7de89c49439fdaa115f6d1caec3256cc3
tree9c1806f951b87d3a42e1a38e9d91d38901bddbdc
parent7d6548abcf4ea4845db8a62a5875d93e2c1bf882
Input: atmel_mxt_ts - use deep sleep mode when stopped

The hardcoded 0x83 CTRL setting overrides other settings in that byte,
enabling extra reporting that may not be useful on a particular platform.

Implement improved suspend mechanism via deep sleep. By writing zero to
both the active and idle cycle times the maXTouch device can be put into a
deep sleep mode, using minimal power. It is necessary to issue a calibrate
command after the chip has spent any time in deep sleep, however a soft
reset is unnecessary.

Use the old method on Chromebook Pixel via platform data option.

This patch also deals with the situation where the power configuration is
zero on probe, which would mean that the device never wakes up to execute
commands.

After a config download, the T7 power configuration may have changed so it
is necessary to re-read it.

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>
drivers/input/touchscreen/atmel_mxt_ts.c
drivers/platform/chrome/chromeos_laptop.c
include/linux/i2c/atmel_mxt_ts.h [deleted file]
include/linux/platform_data/atmel_mxt_ts.h [new file with mode: 0644]