|
@@ -1300,8 +1300,10 @@ static irqreturn_t raydium_ts_interrupt(int irq, void *dev_id)
|
|
|
} else {
|
|
|
if (!work_pending(&g_raydium_ts->work)) {
|
|
|
|
|
|
- result = queue_work(g_raydium_ts->workqueue,
|
|
|
- &g_raydium_ts->work);
|
|
|
+ if (g_raydium_ts->workqueue) {
|
|
|
+ result = queue_work(g_raydium_ts->workqueue,
|
|
|
+ &g_raydium_ts->work);
|
|
|
+ }
|
|
|
|
|
|
if (!result) {
|
|
|
|
|
@@ -2512,6 +2514,9 @@ exit_check_functionality_failed:
|
|
|
void raydium_ts_shutdown(struct i2c_client *client)
|
|
|
{
|
|
|
|
|
|
+ LOGD(LOG_INFO, "[touch] %s: start\n", __func__);
|
|
|
+
|
|
|
+ cancel_work_sync(&g_raydium_ts->work);
|
|
|
if (g_raydium_ts->workqueue) {
|
|
|
destroy_workqueue(g_raydium_ts->workqueue);
|
|
|
g_raydium_ts->workqueue = NULL;
|
|
@@ -2546,22 +2551,26 @@ if (active_panel)
|
|
|
if (gpio_is_valid(g_raydium_ts->irq_gpio))
|
|
|
gpio_free(g_raydium_ts->irq_gpio);
|
|
|
|
|
|
+
|
|
|
raydium_enable_regulator(g_raydium_ts, false);
|
|
|
raydium_get_regulator(g_raydium_ts, false);
|
|
|
|
|
|
kfree(g_raydium_ts);
|
|
|
|
|
|
i2c_set_clientdata(client, NULL);
|
|
|
+ LOGD(LOG_INFO, "[touch] %s: done\n", __func__);
|
|
|
}
|
|
|
|
|
|
static int raydium_ts_remove(struct i2c_client *client)
|
|
|
{
|
|
|
|
|
|
- if (g_raydium_ts->workqueue) {
|
|
|
- destroy_workqueue(g_raydium_ts->workqueue);
|
|
|
- g_raydium_ts->workqueue = NULL;
|
|
|
- }
|
|
|
+ LOGD(LOG_INFO, "[touch] %s: start\n", __func__);
|
|
|
|
|
|
+ cancel_work_sync(&g_raydium_ts->work);
|
|
|
+ if (g_raydium_ts->workqueue) {
|
|
|
+ destroy_workqueue(g_raydium_ts->workqueue);
|
|
|
+ g_raydium_ts->workqueue = NULL;
|
|
|
+ }
|
|
|
#if defined(CONFIG_FB)
|
|
|
raydium_unregister_notifier();
|
|
|
#elif defined(CONFIG_HAS_EARLYSUSPEND)
|
|
@@ -2590,12 +2599,14 @@ if (active_panel)
|
|
|
if (gpio_is_valid(g_raydium_ts->irq_gpio))
|
|
|
gpio_free(g_raydium_ts->irq_gpio);
|
|
|
|
|
|
+
|
|
|
raydium_enable_regulator(g_raydium_ts, false);
|
|
|
raydium_get_regulator(g_raydium_ts, false);
|
|
|
|
|
|
kfree(g_raydium_ts);
|
|
|
|
|
|
i2c_set_clientdata(client, NULL);
|
|
|
+ LOGD(LOG_INFO, "[touch] %s: done\n", __func__);
|
|
|
return 0;
|
|
|
}
|
|
|
|