diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.c b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.c index 2eb33f718c61..60e5f31fcc99 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.c +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.c @@ -1218,6 +1218,7 @@ static int fts_parse_dt(struct device *dev, struct fts_ts_platform_data *pdata) { int ret = 0; struct device_node *np = dev->of_node; + struct fts_ts_data *ts_data = fts_data; u32 temp_val = 0; FTS_FUNC_ENTER(); @@ -1292,6 +1293,15 @@ static int fts_parse_dt(struct device *dev, struct fts_ts_platform_data *pdata) FTS_INFO("max touch number:%d, irq gpio:%d, reset gpio:%d", pdata->max_touch_number, pdata->irq_gpio, pdata->reset_gpio); + ret = of_property_read_string(np, "focaltech,panel-supplier", + &ts_data->panel_supplier); + if (ret < 0) { + ts_data->panel_supplier = NULL; + FTS_ERROR("Unable to read panel supplier\n"); + } else { + FTS_INFO("panel supplier is %s", (char *)ts_data->panel_supplier); + } + FTS_FUNC_EXIT(); return 0; } diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.h b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.h index f0ec30425dd8..5db82b16a2d2 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.h +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.h @@ -182,6 +182,7 @@ struct fts_ts_data { int key_state; int touch_point; int point_num; + const char *panel_supplier; struct regulator *vdd; struct regulator *vcc_i2c; #if FTS_PINCTRL_EN diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c index 7c80e3661742..b7196be90c69 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c @@ -1267,6 +1267,18 @@ static ssize_t fts_log_level_store( return count; } +static ssize_t fts_panel_supplier_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct fts_ts_data *data = dev_get_drvdata(dev); + + if (data->panel_supplier) + return scnprintf(buf, PAGE_SIZE, "%s\n", + data->panel_supplier); + return 0; +} +static DEVICE_ATTR(panel_supplier, 0444, fts_panel_supplier_show, NULL); + /* get the fw version example:cat fw_version */ static DEVICE_ATTR(fts_fw_version, S_IRUGO | S_IWUSR, fts_tpfwver_show, fts_tpfwver_store); @@ -1326,6 +1338,7 @@ static struct attribute *fts_attributes[] = { &dev_attr_doreflash.attr, &dev_attr_poweron.attr, &dev_attr_productinfo.attr, + &dev_attr_panel_supplier.attr, NULL };