Add fallback power config values for Atmel T7
On suspend the atmel driver backs up the power configuration (T7) so
that it can restore it later on resume. If the i2c transaction fails
when it's trying to read the current T7 config it sets a flag saying
that it was unable to back up the config, and then won't try to restore
it when the machine resumes.
A problem occurs if the i2c transaction to read the current config to
back it up on suspend fails, but the driver is still able to turn off
the touchpad. Then on resume, it sees that it had failed to backup the
old values and never restores the T7 object. As a result the
touchscreen/pad never wakes up.
Suspend:
1) Read current T7 config and back it up
2) Overwrite current config with suspend config
Resume
3) restore value stored in step 1
So if step 1 fails, but step 2 succedes we run into a dead touch device
on resume. Reboot fixes everything, however.
This patch adds in some default values in the event that a failed backup
config is detected and makes sure the device actually gets turned on no
matter what on resume.
BUG=chrome-os-partner:17621
TEST=manually tested on Link
Change-Id: I325efae0eb2d801d07898ad29a09e3162e5b79e5
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47564
Reviewed-by: Yufeng Shen <miletus@chromium.org>