summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Pfetsch <spfetsch@google.com>2019-03-14 16:20:16 -0700
committerSteve Pfetsch <spfetsch@google.com>2019-03-14 23:24:59 +0000
commit96bca8526692bea82948f1428fb2158c2f360467 (patch)
tree2cba5944fb03f737f20356e456eb91c84a9efc6c
parentec3090c26e3a8afba6e158d6f2d752b26e1997d6 (diff)
downloadfts_touch-96bca8526692bea82948f1428fb2158c2f360467.tar.gz
input: touchscreen: fts: add firmware name and extinfo to appid
Dump the final firmware file name and the extended display panel info (if any) into the appid sysfs node. Bug: 120554320 Change-Id: I0d17f3341dac2c9db56dd4a88c831cd67fb9c932 Signed-off-by: Steve Pfetsch <spfetsch@google.com>
-rw-r--r--fts.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/fts.c b/fts.c
index 0636d4f..46dbd16 100644
--- a/fts.c
+++ b/fts.c
@@ -271,6 +271,7 @@ static ssize_t fts_fwupdate_show(struct device *dev,
static ssize_t fts_appid_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
+ struct fts_ts_info *info = dev_get_drvdata(dev);
int written = 0;
char temp[35];
@@ -287,7 +288,23 @@ static ssize_t fts_appid_show(struct device *dev, struct device_attribute *attr,
systemInfo.u8_cfgAfeVer,
systemInfo.u16_cfgProjectId);
written += scnprintf(buf + written, PAGE_SIZE - written,
- "MPFlag: %02X\n",
+ "FW file: %s\n", info->board->fw_name);
+
+ written += scnprintf(buf + written, PAGE_SIZE - written,
+ "Extended display info: ");
+ if (!info->extinfo.is_read)
+ written += scnprintf(buf + written, PAGE_SIZE - written,
+ "[pending]");
+ else if (info->extinfo.size == 0)
+ written += scnprintf(buf + written, PAGE_SIZE - written,
+ "[none]");
+ else if (info->extinfo.size * 2 < PAGE_SIZE - written) {
+ bin2hex(buf + written, info->extinfo.data, info->extinfo.size);
+ written += info->extinfo.size * 2;
+ }
+
+ written += scnprintf(buf + written, PAGE_SIZE - written,
+ "\nMPFlag: %02X\n",
systemInfo.u8_mpFlag);
return written;