summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBo Kim <bok@nvidia.com>2013-11-12 14:44:34 +0900
committerHarry Hong <hhong@nvidia.com>2013-11-12 00:58:33 -0800
commit7a44e63b7af9e134958fa8777f8df333b4c90269 (patch)
treea9047e4aedc6169dbeb1f0f1f8af896895e23f4c /drivers
parentea70be4d831ccb26d02eaf7ed79c085923c52e98 (diff)
Revert "Revert "input: touch: maxim_sti: Shutdown safely""
This reverts commit ce2ba962988bacc50bba26896fd6e257a974a2ac. Bug 404490 Change-Id: I9802181a1063f1b6a62a7a6926129044e75cd43f Signed-off-by: Bo Kim <bok@nvidia.com> Reviewed-on: http://git-master/r/329441 Reviewed-by: Harry Hong <hhong@nvidia.com> Tested-by: Harry Hong <hhong@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/maxim_sti.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/maxim_sti.c b/drivers/input/touchscreen/maxim_sti.c
index bc7af341b5b4..23910d6752ee 100644
--- a/drivers/input/touchscreen/maxim_sti.c
+++ b/drivers/input/touchscreen/maxim_sti.c
@@ -1836,6 +1836,12 @@ static int remove(struct spi_device *spi)
INFO("removing...\n");
+ if (dd->irq_registered)
+ disable_irq(dd->spi->irq);
+
+ dd->nl_enabled = false;
+ (void)kthread_stop(dd->thread);
+
if (dd->fusion_process != (pid_t)0)
(void)kill_pid(find_get_pid(dd->fusion_process), SIGKILL, 1);
@@ -1885,6 +1891,17 @@ static void shutdown(struct spi_device *spi)
INFO("doing shutdown...\n");
+ if (dd->irq_registered)
+ disable_irq(dd->spi->irq);
+
+ dd->nl_enabled = false;
+ (void)kthread_stop(dd->thread);
+
+ if (dd->fusion_process != (pid_t)0)
+ (void)kill_pid(find_get_pid(dd->fusion_process), SIGKILL, 1);
+
+ stop_scan_canned(dd);
+
pdata->reset(pdata, 0);
usleep_range(100, 120);
regulator_control(dd, false);