stmicro_mmi: identify product by chip id

Use chip ID_0 reported in touch IC system information block
to represent the product. This will help distinguishing firmware
files for different ST chipsets

Change-Id: I250c6ae57411e6a3aca3f87c789379a048ccb0eb
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1825923
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Konstantin Makariev 2020-12-11 13:20:43 -06:00 • committed by Konstantin Makariev
commit 24469e8156

View file

@ -40,9 +40,8 @@ static int fts_mmi_get_productinfo(struct device *dev, void *cdata) {
char buffer[64];
ssize_t blen = 0;
ASSERT_PTR(ts);
blen += scnprintf(buffer+blen, sizeof(buffer)-blen, "%02x%02x%02x%02x",
ts->sysinfo->u8_dieInfo[0], ts->sysinfo->u8_dieInfo[1],
ts->sysinfo->u8_dieInfo[2], ts->sysinfo->u8_dieInfo[3]);
blen += scnprintf(buffer+blen, sizeof(buffer)-blen, "fts%04x",
ts->sysinfo->u16_chip0Id);
return scnprintf(TO_CHARP(cdata), TS_MMI_MAX_INFO_LEN, "%s", buffer);
}