mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
Add sys node ic_ver and name
Moto hardware revision need ic_ver. Add sys node in focaltech_0flash_mmi touch driver. name sys node provides the HW name. ic_ver sys node provides touchscreen IC,Product ID and Build ID information. NO_PROP_NEEDED Change-Id: I2a0a49f3d4a166ce1dc319900782b08a68c20214 Signed-off-by: shourieg <shourieg@motorola.com> Reviewed-on: https://gerrit.mot.com/1668588 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Marcos Sassahara <msassaha@motorola.com> Reviewed-by: Jun Weng <wengjun1@motorola.com> Reviewed-by: Yeqing Wang <wangyq13@motorola.com> Reviewed-by: Hujun Liao <liaohj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
92c6520ba5
commit
d303777d9e
1 changed files with 31 additions and 0 deletions
|
|
@ -671,6 +671,33 @@ static ssize_t fts_productinfo_show(struct device *dev, struct device_attribute
|
|||
return scnprintf(buf, PAGE_SIZE, "%s\n", FTS_CHIP_NAME);
|
||||
}
|
||||
|
||||
static ssize_t fts_ic_ver_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int count = 0;
|
||||
u8 val = 0;
|
||||
struct input_dev *input_dev = fts_data->input_dev;
|
||||
mutex_lock(&input_dev->mutex);
|
||||
#if FTS_ESDCHECK_EN
|
||||
fts_esdcheck_proc_busy(1);
|
||||
#endif
|
||||
fts_read_reg(FTS_REG_VENDOR_ID, &val);
|
||||
count += snprintf(buf + count, PAGE_SIZE, "Product ID: 0x%02x\n", val);
|
||||
fts_read_reg(FTS_REG_FW_VER, &val);
|
||||
count += snprintf(buf + count, PAGE_SIZE, "Build ID: 0000-%02x\n", val);
|
||||
count += scnprintf(buf + count, PAGE_SIZE, "IC: %s\n", FTS_CHIP_NAME);
|
||||
#if FTS_ESDCHECK_EN
|
||||
fts_esdcheck_proc_busy(0);
|
||||
#endif
|
||||
mutex_unlock(&input_dev->mutex);
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t fts_name_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return scnprintf(buf, PAGE_SIZE, "focaltech");
|
||||
}
|
||||
/* fts_tpfwver interface */
|
||||
static ssize_t fts_tpfwver_show(
|
||||
struct device *dev, struct device_attribute *attr, char *buf)
|
||||
|
|
@ -1315,6 +1342,8 @@ static DEVICE_ATTR(flashprog, S_IRUGO, flashprog_show, NULL);
|
|||
static DEVICE_ATTR(doreflash, S_IWUSR | S_IWGRP, NULL, doreflash_store);
|
||||
static DEVICE_ATTR(poweron, S_IRUGO, fts_poweron_show, NULL);
|
||||
static DEVICE_ATTR(productinfo, S_IRUGO, fts_productinfo_show, NULL);
|
||||
static DEVICE_ATTR(ic_ver, S_IRUGO, fts_ic_ver_show, NULL);
|
||||
static DEVICE_ATTR(name, S_IRUGO, fts_name_show, NULL);
|
||||
|
||||
/* add your attr in here*/
|
||||
static struct attribute *fts_attributes[] = {
|
||||
|
|
@ -1338,6 +1367,8 @@ static struct attribute *fts_attributes[] = {
|
|||
&dev_attr_doreflash.attr,
|
||||
&dev_attr_poweron.attr,
|
||||
&dev_attr_productinfo.attr,
|
||||
&dev_attr_ic_ver.attr,
|
||||
&dev_attr_name.attr,
|
||||
&dev_attr_panel_supplier.attr,
|
||||
NULL
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue