mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
channel input: add nova touch support rmmod
add nova touch support rmmod rmmod and insmod work well Change-Id: I36b43461fd584bcee1e191db256ec89c1ffe6fba Signed-off-by: dengwei1 <dengwei1@motorola.com> Reviewed-on: https://gerrit.mot.com/1245946 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
a5c3849026
commit
5147d1ce01
3 changed files with 75 additions and 1 deletions
|
|
@ -66,6 +66,7 @@ uint8_t esd_retry_max = 5;
|
|||
|
||||
#if NVT_TOUCH_EXT_PROC
|
||||
extern int32_t nvt_extra_proc_init(void);
|
||||
extern void nvt_extra_proc_remove(void);
|
||||
#endif
|
||||
|
||||
#if NVT_TOUCH_FW
|
||||
|
|
@ -75,6 +76,7 @@ extern int32_t nvt_fw_sysfs_deinit(void);
|
|||
|
||||
#if NVT_TOUCH_MP
|
||||
extern int32_t nvt_mp_proc_init(void);
|
||||
extern void nvt_mp_proc_remove(void);
|
||||
#endif
|
||||
|
||||
struct nvt_ts_data *ts;
|
||||
|
|
@ -627,6 +629,15 @@ static int32_t nvt_flash_proc_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void nvt_flash_proc_remove(void)
|
||||
{
|
||||
if (NVT_proc_entry != NULL) {
|
||||
remove_proc_entry(DEVICE_NAME, NULL);
|
||||
NVT_LOG("Removed %s under /proc\n",
|
||||
DEVICE_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
#if WAKEUP_GESTURE
|
||||
#define GESTURE_WORD_C 12
|
||||
#define GESTURE_WORD_W 13
|
||||
|
|
@ -1535,6 +1546,24 @@ static int32_t nvt_ts_remove(struct i2c_client *client)
|
|||
NVT_LOG("Removing driver...\n");
|
||||
|
||||
free_irq(client->irq, ts);
|
||||
if (gpio_is_valid(ts->irq_gpio)) {
|
||||
gpio_free(ts->irq_gpio);
|
||||
}
|
||||
#if NVT_TOUCH_SUPPORT_HW_RST
|
||||
if (gpio_is_valid(ts->reset_gpio))
|
||||
gpio_free(ts->reset_gpio);
|
||||
#endif
|
||||
|
||||
#if NVT_TOUCH_PROC
|
||||
nvt_flash_proc_remove();
|
||||
#endif
|
||||
#if NVT_TOUCH_MP
|
||||
nvt_mp_proc_remove();
|
||||
#endif
|
||||
#if NVT_TOUCH_EXT_PROC
|
||||
nvt_extra_proc_remove();
|
||||
#endif
|
||||
|
||||
input_unregister_device(ts->input_dev);
|
||||
i2c_set_clientdata(client, NULL);
|
||||
kfree(ts);
|
||||
|
|
@ -1925,8 +1954,11 @@ static void __exit nvt_driver_exit(void)
|
|||
#endif
|
||||
|
||||
#if NVT_TOUCH_ESD_PROTECT
|
||||
if (nvt_esd_check_wq)
|
||||
if (nvt_esd_check_wq) {
|
||||
cancel_delayed_work_sync(&nvt_esd_check_work);
|
||||
flush_workqueue(nvt_esd_check_wq);
|
||||
destroy_workqueue(nvt_esd_check_wq);
|
||||
}
|
||||
#endif /* #if NVT_TOUCH_ESD_PROTECT */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -691,4 +691,31 @@ int32_t nvt_extra_proc_init(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nvt_extra_proc_remove(void)
|
||||
{
|
||||
if (NVT_proc_fw_version_entry != NULL) {
|
||||
remove_proc_entry(NVT_FW_VERSION, NULL);
|
||||
NVT_LOG("Removed %s under /proc\n",
|
||||
NVT_FW_VERSION);
|
||||
}
|
||||
|
||||
if (NVT_proc_baseline_entry != NULL) {
|
||||
remove_proc_entry(NVT_BASELINE, NULL);
|
||||
NVT_LOG("Removed %s under /proc\n",
|
||||
NVT_BASELINE);
|
||||
}
|
||||
|
||||
if (NVT_proc_raw_entry != NULL) {
|
||||
remove_proc_entry(NVT_RAW, NULL);
|
||||
NVT_LOG("Removed %s under /proc\n",
|
||||
NVT_RAW);
|
||||
}
|
||||
|
||||
if (NVT_proc_diff_entry != NULL) {
|
||||
remove_proc_entry(NVT_DIFF, NULL);
|
||||
NVT_LOG("Removed %s under /proc\n",
|
||||
NVT_DIFF);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1898,4 +1898,19 @@ int32_t nvt_mp_proc_init(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void nvt_mp_proc_remove(void)
|
||||
{
|
||||
if (NVT_proc_selftest_entry != NULL) {
|
||||
remove_proc_entry("nvt_selftest", NULL);
|
||||
NVT_LOG("Removed %s under /proc\n",
|
||||
"nvt_selftest");
|
||||
}
|
||||
#if NVT_TOUCH_MP_LENOVO
|
||||
if (NVT_proc_selftest_read_data != NULL) {
|
||||
remove_proc_entry("nvt_read_data", NULL);
|
||||
NVT_LOG("Removed %s under /proc\n",
|
||||
"nvt_read_data");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* #if NVT_TOUCH_MP */
|
||||
|
|
|
|||
Loading…
Reference in a new issue