input: touchkey: add resume function 09/75709/1 accepted/tizen/mobile/20160622.021317 submit/tizen/20160621.063915
authorJoonyoung Shim <jy0922.shim@samsung.com>
Mon, 20 Jun 2016 09:42:18 +0000 (18:42 +0900)
committerJoonyoung Shim <jy0922.shim@samsung.com>
Mon, 20 Jun 2016 09:42:18 +0000 (18:42 +0900)
Now, there is only suspend function then it will cause a problem that
touchkey is not working after sleep, so add resume function.

It's enough only that resume function calls tc300k_input_open() because
suspend function calls just tc300k_input_close().

Change-Id: I2b96fe797a94fbd20cd3082c9460130dd6b848eb
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
drivers/input/keyboard/coreriver/tc350-touchkey.c

index 4d54fec..0d980a7 100644 (file)
@@ -2373,6 +2373,14 @@ static int tc300k_suspend(struct device *dev)
 
        return 0;
 }
+
+static int tc300k_resume(struct device *dev)
+{
+       struct tc300k_data *data = dev_get_drvdata(dev);
+       struct input_dev *input_dev = data->input_dev;
+
+       return tc300k_input_open(input_dev);
+}
 #endif
 
 MODULE_DEVICE_TABLE(i2c, tc300k_id);
@@ -2380,6 +2388,7 @@ MODULE_DEVICE_TABLE(i2c, tc300k_id);
 #ifndef CONFIG_HAS_EARLYSUSPEND
 const struct dev_pm_ops tc300k_pm_ops = {
        .suspend = tc300k_suspend,
+       .resume = tc300k_resume,
 };
 #endif