From e836bf97a1a9bcfd221da78ba0f6415fc4511c08 Mon Sep 17 00:00:00 2001 From: dengwei1 Date: Thu, 14 Feb 2019 14:18:48 +0800 Subject: [PATCH] kane: input add ic_ver file for himax touch input add ic_ver file for himax touch to support hwprop Change-Id: I8f5e1a8f885aaf1150c59d93cbe37c0845722b4d Signed-off-by: dengwei1 Reviewed-on: https://gerrit.mot.com/1308672 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/input/touchscreen/hxchipset/himax_common.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/input/touchscreen/hxchipset/himax_common.c b/drivers/input/touchscreen/hxchipset/himax_common.c index cb84b99a0c7f..260f6a92d2a8 100755 --- a/drivers/input/touchscreen/hxchipset/himax_common.c +++ b/drivers/input/touchscreen/hxchipset/himax_common.c @@ -2321,6 +2321,12 @@ exit: return retval; } +static ssize_t himax_sysfs_ic_ver_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + return snprintf(buf, PAGE_SIZE, "[FW]%04x,[IC]%s\n", ic_data->vendor_config_ver, himax_ic_type_to_string()); +} + static struct device_attribute attrs[] = { __ATTR(poweron, S_IRUSR | S_IRGRP, himax_sysfs_poweron_show, @@ -2340,6 +2346,9 @@ static struct device_attribute attrs[] = { __ATTR(forcereflash, S_IWUSR | S_IWGRP, NULL, himax_sysfs_force_reflash_store), + __ATTR(ic_ver, S_IRUGO, + himax_sysfs_ic_ver_show, + NULL), }; #include -- 2.20.1