fpc1020: Add vendor sys entry

This sys entry shows current fingerprint vendor.
This info is useful if multi fingerprint vendor exist in one product.

Change-Id: I77a97745802c30bb319ed3b62fc222101f6ac6ff
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1340583
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1322013
This commit is contained in:
haojl2 2019-03-18 13:01:54 +08:00 • committed by Jialei Hao
commit 2bc6445321

View file

@ -153,6 +153,14 @@ static ssize_t irq_cnt_get(struct device *device,
}
static DEVICE_ATTR(irq_cnt, S_IRUSR, irq_cnt_get, NULL);
/* Attribute: vendor (RO) */
static ssize_t vendor_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return scnprintf(buf, PAGE_SIZE, "fpc");
}
static DEVICE_ATTR_RO(vendor);
static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
char *buf)
{
@ -164,6 +172,7 @@ static struct attribute *attributes[] = {
&dev_attr_dev_enable.attr,
&dev_attr_irq.attr,
&dev_attr_irq_cnt.attr,
&dev_attr_vendor.attr,
&dev_attr_modalias.attr,
NULL
};