BACKPORT: Input: elan_i2c - add support for multi IC type and iap format

In order to support multiple IC types for i2c/smbus protocol, add get ic
type command and use this data when checking firmware page count and
signature address.

BUG=none
TEST=built the kernel with this patch, and it still worked

Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(Backported from commit 12018ac3d679d6a3c6c738ac805797fe4dd43912)
Signed-off-by: Duson Lin <dusonlin@emc.com.tw>

Change-Id: Iba9ddb810501732f94101dc3e94cd6a2777f5f88
Reviewed-on: https://chromium-review.googlesource.com/277382
Reviewed-by: 政維 林 <dusonlin@emc.com.tw>
Commit-Queue: 政維 林 <dusonlin@emc.com.tw>
Tested-by: 政維 林 <dusonlin@emc.com.tw>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
1 file changed