Merge "touch: goodix: set ESD check disabled as default"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
5951b6d9d7
@@ -61,6 +61,8 @@ static void goodix_register_for_panel_events(struct device_node *dp,
|
||||
struct goodix_module goodix_modules;
|
||||
int core_module_prob_sate = CORE_MODULE_UNPROBED;
|
||||
|
||||
int goodix_ts_esd_init(struct goodix_ts_core *cd);
|
||||
|
||||
static int goodix_send_ic_config(struct goodix_ts_core *cd, int type);
|
||||
/**
|
||||
* __do_register_ext_module - register external module
|
||||
@@ -725,13 +727,19 @@ static ssize_t goodix_ts_esd_info_store(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct goodix_ts_core *core_data = dev_get_drvdata(dev);
|
||||
|
||||
if (!buf || count <= 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (buf[0] != '0')
|
||||
if (buf[0] != '0') {
|
||||
if (!core_data->esd_initialized)
|
||||
goodix_ts_esd_init(core_data);
|
||||
goodix_ts_blocking_notify(NOTIFY_ESD_ON, NULL);
|
||||
else
|
||||
} else if (core_data->esd_initialized) {
|
||||
goodix_ts_blocking_notify(NOTIFY_ESD_OFF, NULL);
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -1703,6 +1711,7 @@ int goodix_ts_esd_init(struct goodix_ts_core *cd)
|
||||
ts_esd->esd_notifier.notifier_call = goodix_esd_notifier_callback;
|
||||
goodix_ts_register_notifier(&ts_esd->esd_notifier);
|
||||
goodix_ts_esd_on(cd);
|
||||
cd->esd_initialized = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2046,9 +2055,6 @@ skip_goodix_ts_irq_setup:
|
||||
/* create procfs files */
|
||||
goodix_ts_procfs_init(cd);
|
||||
|
||||
/* esd protector */
|
||||
goodix_ts_esd_init(cd);
|
||||
|
||||
/* gesture init */
|
||||
gesture_module_init();
|
||||
|
||||
|
@@ -504,6 +504,7 @@ struct goodix_ts_core {
|
||||
|
||||
struct notifier_block ts_notifier;
|
||||
struct goodix_ts_esd ts_esd;
|
||||
bool esd_initialized;
|
||||
|
||||
#if defined(CONFIG_DRM)
|
||||
struct notifier_block fb_notifier;
|
||||
|
Reference in New Issue
Block a user