CHROMIUM: Input: atmel_mxt_ts - ensure we are in deep sleep when disabling T100

Atmel's firmware gets confused if we do not have T15 and try to disable
T100 while controller is not in deep sleep. They also say that when
disabling T100 we should also disable T101 (hover) and T104 (Aux touch
config), otherwise they consider the configuration invalid.

While they will look into making the firmware more robust, let's stop
disabling T100 in mxt_stop() - Atmel says that it does not result in
additional power savings compared to the deep sleep.

Also, in mxt_start(), read current value of T100 control register and
avoid writing it unless it is different from what we want it to be, and
do it before we bring the device out of deep sleep mode.

BUG=chrome-os-partner:57704, chrome-os-partner:59131
TEST=Built and booted Celes, used touchscreen

Change-Id: Ie47a90a6e9a5bc9ff71e200027abfdc2e55e8716
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/414933
Tested-by: Jongpil Jung <jongpil19.jung@samsung.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
1 file changed