Input: atmel_mxt_ts - add bootloader addresses for new chips
authorNick Dyer <nick.dyer@itdev.co.uk>
Wed, 23 Jul 2014 19:45:26 +0000 (12:45 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 23 Jul 2014 21:42:10 +0000 (14:42 -0700)
Later chips (for example mXT1664S) different mappings for bootloader
addresses.  This means that we must look at the family ID to determine
which address to use.

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

index bc1d276871c5bc0a9cf92e70ae774aad3a84d354..dc8133d6b914c2b0f2cfe04b0e4beef26cfc663c 100644 (file)
@@ -387,6 +387,12 @@ static int mxt_lookup_bootloader_address(struct mxt_data *data)
        switch (appmode) {
        case 0x4a:
        case 0x4b:
+               /* Chips after 1664S use different scheme */
+               if (data->info.family_id >= 0xa2) {
+                       bootloader = appmode - 0x24;
+                       break;
+               }
+               /* Fall through for normal case */
        case 0x4c:
        case 0x4d:
        case 0x5a: