CHERRY-PICK: CHROMIUM: Input: elan_i2c - Add structure point checking

We add checking structure point is null or not before calling
input sub-system in elan_isr() to avoid excepted kernl panic.

Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
BUG=chrome-os-partner:27191
TEST=on chromebook with Elan touchpad, boot and touchpad works.

Change-Id: I987151e41b985ee2b93b6468f40a73bf822143f9
Reviewed-on: https://chromium-review.googlesource.com/191666
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
(cherry picked from commit 109129a524d5c660e1746823ab14246be4390a8c)
Reviewed-on: https://chromium-review.googlesource.com/201058
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Kevin Cheng <kevin.cheng@intel.com>
Tested-by: Kevin Cheng <kevin.cheng@intel.com>
CHERRY-PICK: CHROMIUM: Input: elan_i2c - Fine tune the reset timing and fetch data when IAP finish.

Adjust the wait timing from 200ms to 300ms when reset TP and remove the buffer
comparition when fetch the data after TP reset.

Beside, because the firmware take care of initialization flow after IAP finish,
remove initialization flow from driver. This change will redouce the communiction
between the driver and firmware, and can cut down the risk about the I2C fail.

Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
BUG=chrome-os-partner:27458
TEST=on chromebook with Elan touchpad, boot and touchpad works.

Change-Id: I7a96331864020b7d7c464253a8290ff5df8c309b
Reviewed-on: https://chromium-review.googlesource.com/194512
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
(cherry picked from commit 70741d4c5ff4ff2e27483e5f26dc0e6eb8a210da)
Reviewed-on: https://chromium-review.googlesource.com/201059
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Kevin Cheng <kevin.cheng@intel.com>
Tested-by: Kevin Cheng <kevin.cheng@intel.com>
CHERRY-PICK: CHROMIUM: sdhci: Allow SHDCI Register Dump on Error

SDHCI driver would call sdhci_dumpregs() in case of many error
conditions. But pr_debug will not output anything unless changes
are made in both global kernel config and local file, which seems
to be excessive. Simply change to pr_err to get dump into dmesg.
This will save a lot of time by getting useful logs in case of
mmc error.

BUG=chrome-os-partner:29021
TEST=Manual: Check no extra reg dump in case of normal operation.

Change-Id: If6cff7cf7f54886186d99c907ab72ab32d4bbd23
Original-Change-Id: Iac0e403ddabdd72a4cada521b4b4309e13355915
Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/201486
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>