summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/iqs5xx.c
diff options
context:
space:
mode:
authorJeff LaBundy <jeff@labundy.com>2021-01-25 07:44:26 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-01-25 07:49:12 +0300
commitce996aa30ef1d20bb8c84aa78087bb07b4745317 (patch)
tree60783a673fdfbec2dee72ebab22109a90b74d8bd /drivers/input/touchscreen/iqs5xx.c
parent8e6a8b0c9fe98b905a2ae4f9f91296eb4f82b9ae (diff)
downloadlinux-ce996aa30ef1d20bb8c84aa78087bb07b4745317.tar.xz
Input: iqs5xx - allow device to be a wake-up source
Avoid placing the device in suspend mode (from which it cannot generate interrupts) if it is defined as a wake-up source. The device is still permitted to enter a low-power sensing mode on its own. Signed-off-by: Jeff LaBundy <jeff@labundy.com> Link: https://lore.kernel.org/r/1611002626-5889-11-git-send-email-jeff@labundy.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/iqs5xx.c')
-rw-r--r--drivers/input/touchscreen/iqs5xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/iqs5xx.c b/drivers/input/touchscreen/iqs5xx.c
index b5287301a293..05e0c6ff217b 100644
--- a/drivers/input/touchscreen/iqs5xx.c
+++ b/drivers/input/touchscreen/iqs5xx.c
@@ -985,7 +985,7 @@ static int __maybe_unused iqs5xx_suspend(struct device *dev)
struct input_dev *input = iqs5xx->input;
int error = 0;
- if (!input)
+ if (!input || device_may_wakeup(dev))
return error;
mutex_lock(&input->mutex);
@@ -1004,7 +1004,7 @@ static int __maybe_unused iqs5xx_resume(struct device *dev)
struct input_dev *input = iqs5xx->input;
int error = 0;
- if (!input)
+ if (!input || device_may_wakeup(dev))
return error;
mutex_lock(&input->mutex);