Skip to content

Commit

Permalink
Input: iqs5xx - allow device to be a wake-up source
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff LaBundy authored and Dmitry Torokhov committed Jan 25, 2021
1 parent 8e6a8b0 commit ce996aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/touchscreen/iqs5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit ce996aa

Please sign in to comment.