Commit ce996aa3 authored by Jeff LaBundy's avatar Jeff LaBundy Committed by Dmitry Torokhov

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: default avatarJeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/1611002626-5889-11-git-send-email-jeff@labundy.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 8e6a8b0c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment