sec_mmi: product info when stuck in bootloader

Firmware update can go wrong causing touch IC unable to enter Apps
mode. In this case touch IC stuck in Bootloader mode and only
Device ID info in register 0x22 is available. Make driver deriving
value reported in productinfo from Device ID register regardless
what mode touch IC is in. That will help init.mmi.touch.sh to
find matching firmware file and recover touch function.

Change-Id: I4e29bdf86dec0d35990004960ca06d4f6e454528
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1411635
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Konstantin Makariev 2019-08-27 15:43:51 -05:00 • committed by Konstantin Makariev
commit 83030db619

View file

@ -478,10 +478,6 @@ static void sec_mmi_fw_read_id(struct sec_mmi_data *data)
__func__, buffer[0], buffer[1], buffer[2], buffer[3],
buffer[4], buffer[5], buffer[6], buffer[7]);
}
snprintf(data->product_id, sizeof(data->product_id), "%c%c%c%02x",
tolower(ts->device_id[0]), tolower(ts->device_id[1]),
ts->device_id[2], ts->device_id[3]);
}
static void sec_mmi_ic_reset(struct sec_mmi_data *data, int mode)
@ -580,7 +576,12 @@ static void sec_mmi_work(struct work_struct *w)
sec_ts_sense_on(ts);
dev_dbg(DEV_MMI, "%s: sensing turned on\n", __func__);
}
} else /* stuck in BL mode, update productinfo to report 'se77c' */
ts->device_id[3] = 0x7C;
snprintf(data->product_id, sizeof(data->product_id), "%c%c%c%02x",
tolower(ts->device_id[0]), tolower(ts->device_id[1]),
ts->device_id[2], ts->device_id[3]);
}
static void sec_mmi_queued_resume(struct work_struct *w)